stdio performance in tango, stdlib, and perl
Andrei Alexandrescu (See Website For Email)
SeeWebsiteForEmail at erdani.org
Thu Mar 22 09:36:26 PDT 2007
torhu wrote:
> torhu wrote:
> <snip>
>> Fastest first:
>>
>> tango.io.Console, no flushing (Andrei's): ca 1.5s
>>
>> C, reusing buffer, gcc & msvc71: ca 3s
>>
>> James' C++, gcc: 3.5s
>>
>> Phobos std.cstream, reused buffer: 11s
>>
>> C w/malloc and free each line, msvc71: 23s
>>
>> Andrei's C++, gcc: 27s
>>
>> C w/malloc and free each line, gcc: 37s
>>
>> Andrei's C++, msvc71: 50s
>>
>> James' C++, msvc: 51s
>
> I've run some of the tests with more accurate timing. Andrei's Tango
> code uses 0.9 seconds, with no flushing, and 1.6 seconds with flushing.
> I also tried cat itself, from the gnuwin32 project. cat clocks in at
> 1.3 seconds.
cat is not comparable. Besides, there must be some overhead associated
with that cat, because Linux' cat consistently clocks way faster than
all line-oriented tests.
Andrei
More information about the Digitalmars-d
mailing list