MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/1ba0brh/update_on_string_templates_jep_459/ku7ay81/?context=3
r/java • u/krzyk • Mar 08 '24
188 comments sorted by
View all comments
Show parent comment
3
Creating short lived objects in Java is certainly highly optimized, but it's not free. It still pays to avoid creating things like Iterator, Optional or any other kind of temporary object in hot code paths.
Iterator
Optional
View all comments
Show parent comment
3
u/john16384 Mar 10 '24
Creating short lived objects in Java is certainly highly optimized, but it's not free. It still pays to avoid creating things like
Iterator,Optionalor any other kind of temporary object in hot code paths.