dtoa-benchmark

corei7920@2.67_win32_vc2013

Time per double (lower is better)

MethodTime (ns)Speedup
milo288.10
grisu2385.39
doubleconv412.39
fpconv470.22
sprintf1,338.50
ostrstream2,764.69
ostringstream2,953.63
gay3,064.92

Click any row to use it as the speedup baseline.

Times include a fixed loop-overhead floor of 2.50 ns (measured with a no-op stand-in for dtoa).

milo288.10 nsgrisu2385.39 nsdoubleconv412.39 nsfpconv470.22 nsostrstream2,764.69 nsgay3,064.92 ns

ostringstream and sprintf omitted; they are an order of magnitude slower than the rest.

Time vs. digit count (log scale)

1234567891011121314151617510501005001,0005,0000DigitsTime (ns)loop overhead (2.50 ns)

Hover or click a method to highlight its series.