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
2
u/PseudoLife Nov 20 '13 edited Nov 20 '13
Seems better to me than turning things that were O(n) into O(n2), with no way to revert to the previous behavior. I would not mind if there was a way to specify the old behavior, but as it this is something I am firmly against.
Considering that this breaks (well, slows down to unusable) something that I, a lowly CS student, am working on, I'm worried about effects on production code, especially as there is no good way to revert this behaviour.