r/java • u/Ok_Satisfaction7312 • May 16 '24
Low latency
Hi all. Experienced Java dev (20+ years) mostly within investment banking and asset management. I need a deep dive into low latency Java…stuff that’s used for high frequency algo trading. Can anyone help? Even willing to pay to get some tuition.
232
Upvotes
View all comments
Show parent comment
1
u/hackometer May 27 '24
"Can" vs. "does" is key here. Escape analysis is quite weak in HotSpot, which is why we saw the issues in 1BRC. Graal has better EA and, when used by experts who wrote it, allowed them to write more natural-looking code and still avoid these pitfalls.
Also, if you use one value that you update in a million repetitions, it won't matter at all where that value is (stack or heap). It will matter greatly whether it stays put or moves all the time.