Engineering Kiosk· Folge 265

#265 One Billion Row Challenge: Java mit mmap, Unsafe & richtig vielen Bit-Tricks

· 1 h 11

MP3

Shownotes

<p>Java und Performance in einem Satz? Für viele klingt das immer noch wie ein Widerspruch. Dann kommt eine Challenge daher, bei der eine Milliarde Zeilen Wetterdaten verarbeitet werden sollen, und plötzlich wird aus Stammtischwissen ein echter Engineering-Nerdfight. Genau darum geht es in dieser Episode. Wir tauchen tief in die One Billion Row Challenge ein und schauen uns an, wie eine vermeintlich einfache Aufgabe zum internationalen Performance-Contest wurde.</p><p>Wir sprechen darüber, warum Gunnar Morling diese Challenge gestartet hat, wie aus einer naiven Lösung mit fast fünf Minuten Laufzeit optimierte Implementierungen mit rund 1,5 Sekunden wurden und welche Rolle dabei Java, GraalVM, Memory Mapping, Unsafe, SIMD, Branchless Coding, Hashmaps, Cache-Lines und Integer-Arithmetik spielen. Außerdem schauen wir auf die Kritik an der Challenge, etwa RAM-Disk, Dataset-Overfitting und CPU-spezifische Optimierungen, und wir werfen einen Blick auf alternative Umsetzungen in C, Go, PHP, SQL, DuckDB, ClickHouse, AWK und sogar auf GPU-Ansätze.</p><p>Wenn du Performance-Optimierung nicht nur als Buzzword, sondern als Mischung aus Hardware-Verständnis, Datenstrukturen, Compiler-Wissen und Community-Lernen sehen willst, bist du hier genau richtig. Und ganz nebenbei klären wir auch noch, ob Java wirklich langsam ist oder ob dieser Mythos endlich in Rente darf.</p><p>Bonus: AWK schafft es in elf Zeilen. Nicht schnell, aber stilvoll.</p><p><br></p><p>Unsere aktuellen Werbepartner findest du auf <a href="engineeringkiosk.dev/partners"; rel="nofollow">engineeringkiosk.dev/partners</a></p&… schnelle Feedback zur Episode:</strong></p><p><a href="api.openpodcast.dev/feedback/265/upvote"; rel="nofollow"><strong>👍 (top)</strong></a><strong> </strong><a href="api.openpodcast.dev/feedback/265/downvote"; rel="nofollow"><strong>👎 (geht so)</strong></a></p><p><br></p><h3>Anregungen, Gedanken, Themen und Wünsche</h3><p>Dein Feedback zählt! Erreiche uns über einen der folgenden Kanäle …</p><ul><li>EngKiosk Community: <a href="engineeringkiosk.dev/join-discord"; rel="nofollow">engineeringkiosk.dev/join-discord</a>; </li><li>LinkedIn: <a href="linkedin.com/company/engineering-kiosk/"; rel="nofollow">linkedin.com/company/engineering-kiosk/</a&…: <a href="mailto:stehtisch@engineeringkiosk.dev" rel="nofollow">stehtisch@engineeringkiosk.dev</a></li><li>Mastodon: <a href="podcasts.social/@engkiosk"; rel="nofollow">podcasts.social/@engkiosk</a></li>…: <a href="bsky.app/profile/engineeringkiosk.bsky.social&…; rel="nofollow">bsky.app/profile/engineeringkiosk.bsky.social&…: <a href="instagram.com/engineeringkiosk/"; rel="nofollow">instagram.com/engineeringkiosk/</a></… den Engineering Kiosk</h3><p>Wenn du uns etwas Gutes tun möchtest … Kaffee schmeckt uns immer </p><ul><li>Buy us a coffee: <a href="engineeringkiosk.dev/kaffee"; rel="nofollow">engineeringkiosk.dev/kaffee</a></li&g… Morling: <a href="morling.dev/"; rel="nofollow">morling.dev/</a></li><li>Blog Post “The One Billion Row Challenge”: <a href="morling.dev/blog/one-billion-row-challenge/"; rel="nofollow">morling.dev/blog/one-billion-row-challenge/<… Github Repository: <a href="github.com/gunnarmorling/1brc"; rel="nofollow">github.com/gunnarmorling/1brc</a></li… Software Development Kit Manager: <a href="sdkman.io/"; rel="nofollow">sdkman.io/</a></li><li>1BRC Show and Tell: <a href="github.com/gunnarmorling/1brc/discussions/cate…; rel="nofollow">github.com/gunnarmorling/1brc/discussions/cate… 471: Deprecate the Memory-Access Methods in sun.misc.Unsafe for Removal: <a href="openjdk.org/jeps/471"; rel="nofollow">openjdk.org/jeps/471</a></li><l…: <a href="graalvm.org/"; rel="nofollow">graalvm.org/</a></li><li>Ale… Shipilëv’s Submission mit 187 Zeilen Kommentar: <a href="github.com/gunnarmorling/1brc/blob/main/src/ma…; rel="nofollow">github.com/gunnarmorling/1brc/blob/main/src/ma… known solution: 0.577s (8 core Zen2); C with heavy AVX2: <a href="github.com/gunnarmorling/1brc/discussions/710&…; rel="nofollow">github.com/gunnarmorling/1brc/discussions/710&…: <a href="github.com/gunnarmorling/1brc/discussions/171&…; rel="nofollow">github.com/gunnarmorling/1brc/discussions/171&… in 11 Zeilen: <a href="github.com/emiruz/1brc/blob/main/1brc.awk"; rel="nofollow">github.com/emiruz/1brc/blob/main/1brc.awk</… mit DuckDB: <a href="rmoff.net/2024/01/03/1%EF%B8%8F%E2%83%A3%EF%B8…; rel="nofollow">rmoff.net/2024/01/03/1%EF%B8%8F%E2%83%A3%EF%B8… mit Clickhouse: <a href="ftisiot.net/posts/1brows/"; rel="nofollow">ftisiot.net/posts/1brows/</a></li>… Trillion Row Challenge: <a href="github.com/coiled/1trc"; rel="nofollow">github.com/coiled/1trc</a></li><… One Billion Row Challenge in Go: from 1m45s to 3.4s in nine solutions: <a href="benhoyt.com/writings/go-1brc/"; rel="nofollow">benhoyt.com/writings/go-1brc/</a></li… One Billion Rows in PHP!: <a href="dev.to/realflowcontrol/processing-one-billion-…; rel="nofollow">dev.to/realflowcontrol/processing-one-billion-… in PHP FFI + Rust: <a href="gianlucafabrizi.dev/blog/posts/1brc-php-ffi/&q…; rel="nofollow">gianlucafabrizi.dev/blog/posts/1brc-php-ffi/&l… (Parallel Python): <a href="dask.org/"; rel="nofollow">dask.org/</a></li><li>1BRC–N… Sniping the Java Community: <a href="infoq.com/presentations/1brc/"; rel="nofollow">infoq.com/presentations/1brc/</a></li… Billion Row Challenge (1BRC) - Step-by-step from 71s to 1.7s: <a href="questdb.com/blog/billion-row-challenge-step-by…; rel="nofollow">questdb.com/blog/billion-row-challenge-step-by… merykitty’s Magic SWAR: 8 Lines of Code Explained in 3,000 Words: <a href="questdb.com/blog/1brc-merykittys-magic-swar/&q…; rel="nofollow">questdb.com/blog/1brc-merykittys-magic-swar/&l… to the Fastest #1BRC Solution: <a href="github.com/thomaswue/1brc-steps"; rel="nofollow">github.com/thomaswue/1brc-steps</a></… - What a Journey: <a href="esolutions.tech/1brc-what-a-journey"; rel="nofollow">esolutions.tech/1brc-what-a-journey</a>&… der 1BRC Thomas Wuerthinger: <a href="linkedin.com/in/thomaswue/"; rel="nofollow">linkedin.com/in/thomaswue/</a></li>…: <a href="lock.cmpxchg8b.com/zenbleed.html"; rel="nofollow">lock.cmpxchg8b.com/zenbleed.html</a><… Kiosk Episode #180 Skalierung, aber zu welchem Preis? (Papers We Love): <a href="engineeringkiosk.dev/podcast/episode/180-skali…; rel="nofollow">engineeringkiosk.dev/podcast/episode/180-skali…: <a href="en.wikipedia.org/wiki/Mmap"; rel="nofollow">00:00:00" rel="nofollow noopener ugc" target="_blank">en.wikipedia.org/wiki/Mmap</a></li>…) One Billion Row Challenge und der Java-Performance-Mythos</p><p>() Info/Werbung</p><p>() One Billion Row Challenge und der …

0:00 / 0:00