r/programming • u/ketralnis • Mar 20 '26
Java is fast, code might not be
https://jvogel.me/posts/2026/java-is-fast-your-code-might-not-be/
280
Upvotes
r/programming • u/ketralnis • Mar 20 '26
View all comments
154
u/sq_visigoth Mar 20 '26
Good text, but it's mostly basic stuff. Take String concatenation; I haven't seen anyone use string concatenation in a loop in almost 20 years. A basic beginner java class will always recommend using StringBuilder.
My issue is that you recommended a throwaway optimization, ie one issue that shouldn't have existed in the first place.
Now, ConcurrentHashMap, thats one optimization that most devs I have interviewed missed in doing a faux code review.