JuliaLang/julia — comment on commit 3f753435f137cd39afb0ffbdf4fc777efb03c6dd
File:  line 0
By StefanKarpinski:

> Also, the current printf doesn't seem to generate very well-specialized code. It does an enormous number of function calls for everything. For %d, I would expect something like write(s, int2str(x)). Instead there is a function returning four values, then a branch handling the minus sign, then another function call. Then tests for NaN and Inf which should not be needed for an integer format.

The comparison to `int2str` is kind of bullshit because you're sweeping everything that the printf implementation needs to do under the rug of `int2str`. The only difference is that `int2str` writes to a string as a buffer.