-
Notifications
You must be signed in to change notification settings - Fork 98
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
optimized list iterator some more #618
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one meaningful concern
(on the speedup from moving the in-line import => that's interesting, I've always wondered if there was a performance risk with these... good to know!)
8ce5eee
to
5f53897
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions
@odelalleau I am merging this, let me know if you have any other feedback. |
Closes #613
Second optimization pass.
This is more impressive than the 7.7 -> 8.8x recorded improvement since there seems to be a regression compares to the measurements in #533.
Speed is still not great, but I this is as close as it gets given that we are probably losing a bunch of low level optimization done on native list because we need to unbox primitive items when we iterate.
Comparing
![image](https://user-images.githubusercontent.com/376455/111587520-8f515300-877f-11eb-85a1-71147c6fe5b5.png)
test_list_iter[small_listconfig]
by itself to what is in master shows about 50% speedup:When it's pitched against the native list iteration it's "only" 130 times slower now, compares to 180 times slower before:
![image](https://user-images.githubusercontent.com/376455/111587599-abed8b00-877f-11eb-89dd-913d7791a027.png)
By the way: here is why this is important:
https://twitter.com/jackyliang42/status/1371530444529881094