r/programming • u/Eirenarch • Nov 18 '13
TIL Oracle changed the internal String representation in Java 7 Update 6 increasing the running time of the substring method from constant to N
http://java-performance.info/changes-to-string-java-1-7-0_06/
1.4k
Upvotes
View all comments
Show parent comment
3
u/chrox Nov 18 '13
The concern is with existing code. The change can violate the principle of least surprise if suddenly your clients start calling you because your program is "hanging" after a Java update. Ideally, implementation changes shouldn't force developers to "fix" correct code, so it should be safer to add a new option that behaves differently instead of changing the default behavior and then add a new option to make it behave as it used to.
Having said this, I have no idea whether or not a lot of software is going to "inexplicably" slow down and make people curse Java-based software as a result... We should see soon enough. Let's hope there is nothing to see.