-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Performance improvements to the name equality check when finding a repository index. #638
Conversation
… aligned with my GitHub username.
See line 544 for relevant changes |
* To account for this, we also need to check if the station names themselves are equal. | ||
* However, checking all the bytes in both names is costly. | ||
* We therefore set a threshold for the maximum number of bytes, at the start and end of the name, to check. | ||
* If two names with the same size and hash have the same first N and last N bytes, we're happy they are the equal. |
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'm afraid that this is not valid, as it isn't guaranteed to resolve all potential conflicts.
…fractional performance gain.
A tad slower actually than before: Benchmark 1: timeout -v 300 ./calculate_average_jonathan-aotearoa.sh 2>&1 Summary Leaderboard
|
I did some benchmarking on that method and the results weren't conclusive, so I'm not entirely surprised to see it ran fractionally slower. The issue I'm finding with micro-benchmarking methods in isolation is that the results don't always apply when the method is run in the context of the whole application. It's a great learning experience though. I haven't had an excuse to dive into Linux tools like |
Nice to hear :) Wanna close this one then? |
Hey @jonathan-aotearoa, I am gonna close this one, as we're after the cut-off time, and this one didn't yield an improvement. Thanks a lot for participating in 1BRC! |
Hi @gunnarmorling, thanks for closing the issue, and thanks again for taking the time to setup and and administer this challenge. Very much appreciated. |
Check List:
./mvnw verify
and the project builds successfully./test.sh <username>
shows no differences between expected and actual outputs)calculate_average_<username>.sh
(make sure to match casing of your GH user name) and is executablecalculate_average_baseline.sh