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.23k stars 1.87k forks source link

(new submission) melgenek: ~top 15 on 10k. Buffered IO, VarHandles, vectors, custom hashtable #600

Closed melgenek closed 9 months ago

melgenek commented 9 months ago

Check List:

The implementation:

Collision checks:

# Result (m:s.ms) Implementation JDK Submitter Notes
00:02.244 link 21.0.1-graal Jaromir Hamala uses Unsafe
00:03.183 link 21.0.1-graal Marko Topolnik uses Unsafe
00:03.542 link 21.0.2-open Yevhenii Melnyk This pr
00:06.145 link 21.0.1-open yourwass uses Unsafe
> time ./calculate_average_baseline.sh
180.49s user 
4.79s system 
98% cpu 
3:07.96 total
gunnarmorling commented 9 months ago

OOM-s for the 1B file when run on 32 cores:

Terminating due to java.lang.OutOfMemoryError: Java heap space
melgenek commented 9 months ago

OOM-s for the 1B file when run on 32 cores:

@gunnarmorling The GC is Epsilon, and the solution allocates memory per core. So the hardcoded 64MB heap was not enough. I've adjusted the heap to be proportional to the number of cores.

gunnarmorling commented 9 months ago

Gotcha. Looking good now. 00:05.971, nice!