r/programming • u/_shadowbannedagain • Feb 22 '24
The Billion Row Challenge (1BRC) - Step-by-step from 71s to 1.7s
https://questdb.io/blog/billion-row-challenge-step-by-step/
270
Upvotes
r/programming • u/_shadowbannedagain • Feb 22 '24
123
u/[deleted] Feb 22 '24
Hi!
I'm Marko and I'm the author of the linked blog post. I took part in the One Billion Row challenge (1BRC). It was a lot of fun, but also a great learning experience. People came up with some pretty incredible optimization tricks. When you put them all together, it's a huge number, and they are all mingled up in individual solutions. They also happen on many levels -- from quite high, to incredibly low and detailed.
In retrospect, I can see there's a good number of tricks that are relatively easy to grasp, and reusable in other projects. I felt the urge to do a writeup that captures this knowledge in one place, isolating and explaining each of the tricks.
11
u/vini_2003 Feb 22 '24
This is quite interesting, thank you for it!
Really goes to show how essential profiling is at every step, no matter how large or small the project may be. Very cool tricks, too.
4
u/jawanda Feb 22 '24
I thought this thread was going to be about ergometers, but this is even more interesting.
4
u/i_am_at_work123 Feb 23 '24
Holly molly this was done in Java?!
-39
u/satireplusplus Feb 22 '24
Stopped reading right there. Can you do this with Java? Probably. Should you? Probably not.
0
u/[deleted] Feb 22 '24
[deleted] — view deleted comment
0
u/[deleted] Feb 22 '24
[deleted] — view deleted comment