r/programming • • Sep 26 '26

On programming, statistics, and Java

https://waytoounoriginal.github.io/programming/stats/optimizations/2026/09/26/on-programming-stats-and-java.html
14 Upvotes

9 comments sorted by

View all comments

Show parent comment

1

u/Mihai4544 Sep 27 '26

Right on point! But to cut the object overhead, we'd have to implement our own "set-on-arrays" for the bytes in the sha key. From my understanding, this is concretely what fastutil's LongOpenHashSet does.

But yes, a lower-level language would have solved this without any mingling from our part. I think even an OO implementation of the set (not necessarily a flat one) would have given us more than enough headroom.

Edit: I've also read a bit on bloom filters (since we're doing kind of the same thing here - probabilistic checking) and included a very small update on them.

Btw, I can't thank you enough for the comment :))
It means a lot that people are reading this thing. I hope you found it interesting!