dtoa-benchmark

epyc-7c13_linux_gcc13.3_ee50fc8

Time per double (lower is better)

MethodTime (ns)Speedup
zmij14.03
xjb6415.21
yy26.95
dragonbox30.88
uscale44.46
fmt45.29
schubfach47.04
ryu53.31
to_chars62.82
double-conversion101.10
sprintf477.33
ostringstream702.28

Click any row to use it as the speedup baseline.

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

zmij14.03 nsxjb6415.21 nsyy26.95 nsdragonbox30.88 nsuscale44.46 nsfmt45.29 nsschubfach47.04 nsryu53.31 nsto_chars62.82 nsdouble-conversion101.10 ns

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

Time vs. digit count (log scale)

1234567891011121314151617510501005000DigitsTime (ns)loop overhead (1.37 ns)

Hover or click a method to highlight its series.