-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Sort: bench ahash #10783
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
base: main
Are you sure you want to change the base?
Sort: bench ahash #10783
Conversation
Merging this PR will improve performance by 13.54%
Performance Changes
Comparing Footnotes
|
impressive! |
Interesting, using |
Because I kept 1 |
|
Also we reciently applied |
|
it's probably worth trying foldhash as well? |
b4aa98b to
bd12116
Compare
src/uu/sort/src/sort.rs
Outdated
| use std::ffi::{OsStr, OsString}; | ||
| use std::fs::{File, OpenOptions}; | ||
| use std::hash::{Hash, Hasher}; | ||
| use std::hash::BuildHasher as _; |
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.
why "as _" ?
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.
to avoid confliction in the future.
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.
Applying clippy removed it...
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.
i would prefer we don't have this
it is a pretty ugly in the code base
i would prefer you remove the " as " in use ahash::AHashMap as HashMap;
instead
and change the name
it isn't like we are going not change the hashmap on a regular basis
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.
@xtqqczze recommended shadowing. Should we revert also for other utils?
I switched to AHash* at here anyway.
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.
yes, i don't like shadowing
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
No description provided.