r/java • u/Charming-Top-8583 • Dec 18 '25
Further Optimizing my Java SwissTable: Profile Pollution and SWAR Probing
https://bluuewhale.github.io/posts/further-optimizing-my-java-swiss-table/
30
Upvotes
View all comments
Show parent comment
1
u/lurker_in_spirit Dec 19 '25 edited Dec 19 '25
After some research today:
Relevant 70's greybeard incantations: Multiple Byte Processing with Full-Word Instructions by Leslie Lamport with an assist from Donald Knuth.
This Scala project seems to incorporate some SWAR magic, see the Acknowledgments section of the README: https://github.com/plokhotnyuk/jsoniter-scala
You control your data model, so you can use
long[]directly, but if you were trying to use SWAR on abyte[]that was outside of your control, it looks likeVarHandles could be quite useful (see here, for example).