D-Programming-Language/phobos — pull request #1452 by Kozzi11 (2013-08-05 08:42:16+00:00)
Title: Improve speed of to!string for integral types

string a;
auto A = Clock.currStdTime();

for(int i = 0; i < 1_000_000; ++i)
{
a = to!string(i);
}

auto B = Clock.currStdTime() - A;
writeln(a);
writefln("%s", convert!("hnsecs", "msecs")(B)/1000.0);

this version with optimalization flags
gdc: 0.142
ldmd2: 0.127
dmd2: 0.214

this version without optimalization flags
gdc: 0.407
ldmd2: 0.366
dmd2: 0.248

original version with optimalization flags
gdc: 0.445
ldmd2: 0.438
dmd2: 0.595

original version without optimalization flags
gdc: 0.875
ldmd2: 0.925
dmd2: 0.751