-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: optimize build #694
feat: optimize build #694
Conversation
c798a46
to
4647b3e
Compare
Bench Result of HasFilepathPrefix.
|
4647b3e
to
ace76f4
Compare
ping |
hasher := func(p string) (string, error) { | ||
h := md5.New() | ||
h, _ := highwayhash.New(key) |
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.
Check error. Can you explain or add link to benefits os highwayhash
instead of md5
.
Any disadvantages? Is this project being actively worked on?
@orisano This looks awesome! Thank you for all tour work! |
Looks like this failed
|
a93b5a3
to
38fa360
Compare
if _, err := io.Copy(h, f); err != nil { | ||
buf := pool.Get().(*[]byte) | ||
defer pool.Put(buf) | ||
if _, err := io.CopyBuffer(h, f, *buf); err != nil { |
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.
cool!
Result in my project:
runtime.main: 87.51s -> 55.40s
total: 129.54s -> 88.29s
before:
after: