dtoa-benchmark

epyc-genoa-processor_linux_gcc11.5_8e6015f

Time per double (lower is better)

MethodTime (ns)Speedup
zmij14.15
xjb6415.21
yy31.78
dragonbox40.93
uscale55.71
fmt56.05
schubfach62.41
ryu66.40
to_chars79.51
double-conversion99.17
sprintf520.01
ostringstream890.09

Click any row to use it as the speedup baseline.

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

zmij14.15 nsxjb6415.21 nsyy31.78 nsdragonbox40.93 nsuscale55.71 nsfmt56.05 nsschubfach62.41 nsryu66.40 nsto_chars79.51 nsdouble-conversion99.17 ns

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

Time vs. digit count (log scale)

1234567891011121314151617510501005001,0000DigitsTime (ns)loop overhead (1.98 ns)

Hover or click a method to highlight its series.