Dec. 5, 2010
1:48 p.m.
Status: Accepted Owner: philippe.marschall Labels: Type-Patch Difficulty-Easy Importance-Low New issue 3383 by philippe.marschall: [FIX] make String >> #subStrings: do less allocation http://code.google.com/p/pharo/issues/detail?id=3383 String >> #subStrings: does a lot of allocation. It allocates a new string for almost every character. So if you do something like '/alongUrl/withaPathElement/andSomethingMore' subStrings: '/' about forty strings are allocated. This can easily be avoided using write streams. The method could probably be made even faster by using #indexOfSubCollection:startingAt: and just copying with the correct size. I will post a patch but I first need an issue number that I can reference.