Conversation
Merging this PR will improve performance by 15.19%
Performance Changes
Comparing Footnotes
|
There was a problem hiding this comment.
extract 8_192 to a constant and document
There was a problem hiding this comment.
its doesn't really help, why is 8K chosen, is it related to page size?
There was a problem hiding this comment.
No. Just to avoid huge allocation
There was a problem hiding this comment.
Also I'm not clear why don't we use Vec at 1st.
Maybe, size with few times hashbrown scan?
|
shuf_lines[100000] |
3df1603 to
622c06d
Compare
|
Hmm, I can't fix |
e00e478 to
92205f2
Compare
|
GNU testsuite comparison: |
| impl<'a> NonrepeatingIterator<'a> { | ||
| pub(crate) fn new(range: RangeInclusive<u64>, rng: &'a mut WrappedRng) -> Self { | ||
| let values = Values::Sparse(range, HashMap::default()); | ||
| let avoid_reallocation_bound = 128; // todo: optimize this |
There was a problem hiding this comment.
should be const, maybe MAX_CAPACITY?
There was a problem hiding this comment.
How about hardcoding and leaving // set initial capacity to avoid reallocation. But current capacity might not optimal?
|
GNU testsuite comparison: |
No description provided.