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
6.08k stars 1.83k forks source link

Processing two rows at once #616

Closed artsiomkorzun closed 7 months ago

artsiomkorzun commented 7 months ago

Check List:

gunnarmorling commented 7 months ago

Quite a bit slower than what's on main:

Benchmark 1: timeout -v 300 ./calculate_average_artsiomkorzun.sh 2>&1
  Time (mean ± σ):      2.322 s ±  0.010 s    [User: 0.002 s, System: 0.004 s]
  Range (min … max):    2.306 s …  2.330 s    5 runs

Summary
  artsiomkorzun: trimmed mean 2.3253349731200004, raw times 2.30572737412,2.3247754081200003,2.3302125731200003,2.32768008112,2.32354943012

Leaderboard

| # | Result (m:s.ms) | Implementation     | JDK | Submitter     | Notes     |
|---|-----------------|--------------------|-----|---------------|-----------|
|   | 00:02.325 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_artsiomkorzun.java)| 21.0.2-graal | [Artsiom Korzun](https://github.com/artsiomkorzun) | GraalVM native binary, uses Unsafe |
thomaswue commented 7 months ago

Maybe an inlining issue. @artsiomkorzun Is this faster for you locally?

artsiomkorzun commented 7 months ago

@thomaswue It is certainly faster on macbook with arm proc. But right now I do not have my laptop with amd proc to test :(