string is rarely useful as a function argument
Vladimir Panteleev
vladimir at thecybershadow.net
Sat Dec 31 08:24:53 PST 2011
On Saturday, 31 December 2011 at 15:03:13 UTC, Andrei
Alexandrescu wrote:
>> The whole concept of generic algorithms working on strings
>> efficiently
>> doesn't work.
>
> Apparently std.algorithm does.
According to my research[1], std.array.replace (which uses
std.algorithm under the hood) can be at least 40% faster when
there is a match and 70% faster when there isn't one.
I don't think this is actually related to UTF, though.
[1]:
http://dump.thecybershadow.net/5cfb6713ce6628686c6aa8a23b15c99e/test.d
More information about the Digitalmars-d
mailing list