
29 Sep
2016
29 Sep
'16
10 p.m.
On 30/09/16 3:43 AM, Heinrich Apfelmus wrote:
Also, it's not like other languages all agree on their preferred method of representing strings: NULL-terminated (C) vs "length-byte-first" (Pascal) comes to mind.
Just in support of that claim, Java *changed* its implementation of strings. Originally, someString.substr(beginIndex, endIndex) took O(1) time and space whatever the values of someString, beginIndex, and endIndex. These days it takes O(endIndex - beginIndex) time and space. And yes, that DID mean that the performance characteristics of many Java programs changed without their authors knowing or intending it.