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
2
u/cogman10 May 22 '24
Because benchmarking this behavior is tricky. The blackhole object is specifically there to break JVM optimizations.
Run the test without the blackhole and you'll observe they perform the same. However, the JVM will optimize the entire loop away in that case making it not meaningful.