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

I thought I replied to this, but the reply appears to have gone missing. Basically, the two methods are similar, but not similar enough to make it easy to merge the two. Note, in particular that `print_shortest` does not use proper scientific notation, but rather always uses an integer mantissa followed by an exponent. That's because this "improper" form takes one less character on account of not having a `.` in it. Also, we want these methods to be very fast for printing lots and lots of numbers — especially `print_shortest` since it's likely to be used to print huge volumes of data into CSV or TSV files. For that purpose, I suspect the grisu algorithm will be very effective at giving good compression. I'm guessing that grisu-formatted, bzipped CSV/TSV files will actually be a very compact data representation for a lot of real-world data, which tends to be more "special" when written in decimal than in binary.