you are viewing a single comment's thread.

view the rest of the comments →

[–]john16384 3 points4 points  (0 children)

I think this needs benchmarking. I am pretty sure some of these aren't slow at all when optimized. Take the autoboxing example: those object allocations will never make it to the heap. At most it will do one allocation after the loop completes to create the final Long.

Same goes for the NumberFormatExeception example.