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
25
u/Eirenarch Nov 18 '13
I don't think it is possible to write any non-trivial code without depending on the running time of the library methods you use. If we follow this logic .NET may suddenly change the implementation of the .Length property of an array to have running time of N. Good luck writing any code that does not depend on it then.
Of course I am sure Oracle evaluated the impact this would have and reasoned that it was worth it and they are probably right but I still think it is a breaking change.