-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 Map/Set lookups in Structure #1246
Optimized Map/Set lookups in Structure #1246
Conversation
Here are some benchmark numbers, i will close and reopen this PR to rerun Travis CI.
|
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.
This looks generally good. I've left one question inline. No need for you to close/reopen to trigger the travis builds, we can also trigger them manually when needed (if it's a single, transient failure not associated with the PR)
2255af0
to
83d0617
Compare
Okay, i updated the PR and left some comments to better understand what the code does.
|
Looks good to me. Thanks for investigating and cleaning up. I'll give it a few more day to settle - and if nothing further creeps up or someone beats me to it, I'll merge sometime next week. |
Ah - one further request: Could you add an entry for the |
Reduced the number of Set lookups in Structure.read / Structure.write. Introduced a new class to replace two entries of a HashMap with one. This reduces the number of lookups and the initial capacity has been reduced too. Structure.clear will now clear the native string to ensure following Structure.write calls will write them again.
83d0617
to
b641071
Compare
The latest push added the entry to |
Thank you - pulling this in. |
Reduced the number of Set lookups in Structure.read / Structure.write.
Introduced a new class to replace two entries of a HashMap with one.
This reduces the number of lookups and the initial capacity has been
reduced too.
There is one additional change in line ~363 to avoid a Memory.share()
call if the size of the structure is known.
I could create a benchmark if required.