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

royvanrijn: Trying three readers as well #628

Closed royvanrijn closed 7 months ago

royvanrijn commented 7 months ago

Trying three readers as well, not faster on my old x86, it is faster on the M2... hard to measure what helps and what hurts now.

On my new MacBook I'm very close to @thomaswue and in front of the others, but measuring on that machine hasn't been very reliable.

Just ran the top entries on my machine:

# Result (m:s.ms) Implementation JDK Submitter Notes
00:01.092 link 21.0.2-graal Roy van Rijn GraalVM native binary, uses Unsafe
00:01.108 link 21.0.2-graal Thomas Wuerthinger GraalVM native binary, uses Unsafe
00:01.298 link 21.0.2-graal Van Phu DO GraalVM native binary, uses Unsafe
00:01.432 link 21.0.2-graal Artsiom Korzun GraalVM native binary, uses Unsafe

Let's hope this translates haha, but lately is seems the reference machine isn't close to doing the same as the M2.

Check List:

gunnarmorling commented 7 months ago

Sorry, made things a bit worse:

Benchmark 1: timeout -v 300 ./calculate_average_royvanrijn.sh 2>&1
  Time (mean ± σ):      2.559 s ±  0.011 s    [User: 0.002 s, System: 0.004 s]
  Range (min … max):    2.542 s …  2.569 s    5 runs

Summary
  royvanrijn: trimmed mean 2.560535277553333, raw times 2.54156210322,2.55442099422,2.56392523922,2.56325959922,2.56947195822

Leaderboard

| # | Result (m:s.ms) | Implementation     | JDK | Submitter     | Notes     |
|---|-----------------|--------------------|-----|---------------|-----------|
|   | 00:02.560 | [link](https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_royvanrijn.java)| 21.0.2-graal | [Roy van Rijn](https://github.com/royvanrijn) | GraalVM native binary, uses Unsafe |
royvanrijn commented 7 months ago

Yeah, shows again, can’t trust the M2.