stdio and Tango I/O performance
Andrei Alexandrescu (See Website For Email)
SeeWebsiteForEmail at erdani.org
Wed Mar 21 09:38:18 PDT 2007
Over the past couple of weeks Walter and I have worked on improving the
stdio module, following my shocking discovery that its performance was
inadequate for any amount of serious coding. To say nothing about the
lack of the input routines readf, readln, etc.
The good news is that Walter and myself have improved stdio's reading
performance by an order of magnitude when compared to a naive
implementation using fgetc(). Now reading is almost as fast as C would
allow you, beats Perl and C++, (Perl is harder to beat than C++), while
writef* is still suboptimal (but write without "f" is fast because it
forwards to the C routine).
I was actually surprised that nobody seems to have discovered the
abysmal performance of the writef family. If they did, they would have
likely posted reports on this newsgroup.
This ate a lot of time measuring, testing, and optimizing. So I have a
question - has anyone verified that Tango's I/O performance is up to
snuff? I see it imposes the dynamic-polymorphic approach, and unless
there was some serious performance work going on, it's possible it's
even slower than stdio.
Thanks,
Andrei
More information about the Digitalmars-d
mailing list