Optimized Map/Set lookups in Structure#1246
Optimized Map/Set lookups in Structure#1246matthiasblaesing merged 1 commit intojava-native-access:masterfrom
Conversation
|
Here are some benchmark numbers, i will close and reopen this PR to rerun Travis CI.
|
dbwiddis
left a comment
There was a problem hiding this comment.
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.