stdio and Tango I/O performance

Anders F Björklund afb at algonet.se
Wed Mar 21 11:57:36 PDT 2007


Andrei Alexandrescu (See Website For Email) wrote:

> 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.

It's excellent news that std.stdio is finally getting revamped!
Hopefully you were able to make some use of our previous code
and suggestions, from the discussions held earlier (in 2005).

> 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.

I'm afraid that at least some were more worried about the missing
features initially, and figured that performance would come "later".
Or even that one should use the std.c.stdio functions instead...

For the greatest of times, printf was the recommended output method.
(for instance, looking at "hello.d" in DMD 1.009 shows printf use.
Looking at the "pi.d" example, and it shows using using sscanf ?)

BTW: I don't think there is anything wrong with using "C" I/O routines,
on the contrary it is very useful when quickly porting programs over,
but it does suggest that "D" I/O methods in Phobos were not up to it ?

--anders



More information about the Digitalmars-d mailing list