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
5.69k stars 1.73k forks source link

Use perfect hash for temperature lookup #694

Closed ianopolousfast closed 5 months ago

ianopolousfast commented 5 months ago

Check List:

gunnarmorling commented 5 months ago

Coming in a bit slower than before:

Benchmark 1: timeout -v 300 ./calculate_average_ianopolousfast.sh 2>&1
  Time (mean ± σ):      4.781 s ±  0.061 s    [User: 33.966 s, System: 0.747 s]
  Range (min … max):    4.695 s …  4.847 s    5 runs

Summary
  ianopolousfast: trimmed mean 4.787922194599999, raw times 4.6949676626,4.742957694599999,4.8201604766,4.8006484126,4.8468138546

Leaderboard

| # | Result (m:s.ms) | Implementation     | JDK | Submitter     | Notes     |
|---|-----------------|--------------------|-----|---------------|-----------|
|   | 00:04.787 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_ianopolousfast.java)| 21.0.1-open | [Dr Ian Preston](https://github.com/ianopolousfast) |  |
ianopolousfast commented 5 months ago

That's puzzling. It was a big speed up locally on 4 and 12 core machines.

gunnarmorling commented 5 months ago

Just ran it again, same outcome (within the precision I can measure, it fluctuates by +- 1.5%).