gunnarmorling / 1brc

1️⃣🐝🏎️ The One Billion Row Challenge -- A fun exploration of how quickly 1B rows from a text file can be aggregated with Java
https://www.morling.dev/blog/one-billion-row-challenge/
Apache License 2.0
6k stars 1.8k forks source link

Performance improvements to the name equality check when finding a repository index. #638

Closed jonathan-aotearoa closed 6 months ago

jonathan-aotearoa commented 7 months ago

Check List:

jonathan-aotearoa commented 7 months ago

See line 544 for relevant changes

gunnarmorling commented 6 months ago

A tad slower actually than before:

Benchmark 1: timeout -v 300 ./calculate_average_jonathan-aotearoa.sh 2>&1 Time (mean ± σ): 5.103 s ± 0.015 s [User: 32.934 s, System: 0.715 s] Range (min … max): 5.091 s … 5.128 s 5 runs

Summary jonathan-aotearoa: trimmed mean 5.098993353046667, raw times 5.09063945838,5.09602143738,5.10543017038,5.09552845138,5.128256689380001

Leaderboard grep: ./src/main/java*/dev/morling/onebrc/CalculateAverage_jonathan-aotearoa.java: No such file or directory

# Result (m:s.ms) Implementation JDK Submitter Notes
00:05.098 link 21.0.2-graal Jonathan Wright GraalVM native binary
jonathan-aotearoa commented 6 months ago

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 perf before :)

gunnarmorling commented 6 months ago

Nice to hear :) Wanna close this one then?

gunnarmorling commented 6 months ago

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!

jonathan-aotearoa commented 6 months ago

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.