-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try using array table for cell items #30
base: master
Are you sure you want to change the base?
Conversation
If the option using_orderedQuery is set to true, bump will use the predictable arrary for internal items query operation, which provide more precise simulation results. By default, it's set to false.
Hi there, This is an interesting approach. I had not thought about using both a dictionary and an array, "switching the last item before erasing it" as you do here. I have only browsed the code very briefly and I still don't understand exactly how it works, but the tests pass, so it's working. I think this is worth exploring further. I have some comments:
Regards! |
Remove the using_orderedQuery option. Resolve camelCaseNames/underscore_names problem. Fix some mistakes.
All done. |
Thank you for explaining this. Here are some more comments:
|
use len to iterate array numerically instead of using ipairs.
You got it. |
Thank you. Now the code looks quite nice. I must do some performance tests now. My intuition tells me that this solution will employ more memory (that much is obvious, since where we were using one dictionary, now we have a dictionary + an array), but I am not so sure about how will speed change. Adding and removing objects should be slower, but parsing neighbours should be faster. I can't know for sure. So I must do some performance tests comparing the old with the new (It might take me a while). |
Patience makes perfect work. I admire you for this. |
If the option using_orderedQuery is set to true, bump will use the predictable arrary for internal items query operation, which provide more precise simulation results. By default, it's set to false.