r/programming • u/jonjonbee • Jun 05 '18
Code golfing challenge leads to discovery of string concatenation bug in JDK 9+ compiler
https://stackoverflow.com/questions/50683786/why-does-arrayin-i-give-different-results-in-java-8-and-java-10
2.2k
Upvotes
View all comments
Show parent comment
2
u/Agent_03 Jun 05 '18
I agree you should use great caution with increment/decrement -- and around the team we refer to the pre-increment operator as the "excrement" operator, due to the bugs it has caused.
That performance may be important if you're doing dense numeric or binary operations. For example: I was once working on a pure-Java LZF compression implementation where use of increment/decrement pre/post operations could make a 30% performance difference.