JuliaLang/julia — comment on commit 23ff5492aadeab89868503f0029ca87ba8015d5d
File:  line 0
By JeffBezanson:

This is roughly the code generated just for "%f":

```
x = arg1::Real
if(isfinite(x),
tuple(neg,digits,pt) = _jl_fix10(x,6)
if(length(digits)<=pt,
x = *(rpad(digits,pt,"0"),".","000000")
,if(pt<=0,
x = *("0.",^("0",-(pt)),digits,^("0",+(-(6,length(digits)),pt)))
x = *(ref(digits,:(1,pt)),".",rpad(ref(digits,:(+(pt,1),:)),6,"0"))
x = *(if(neg,"-",""),x)
if(isnan(x),
x = NaN
,if(x<0,
x = -Inf
x = Inf
x
```

That seems like an awful lot to crank through for every format specifier.