stdio performance in tango, stdlib, and perl
kris
foo at bar.com
Thu Mar 22 01:41:58 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.
Just for jollies, a briefly optimized tango.io was tried also: it came
in at around 0.7 seconds. On a tripled file-size (3 million lines), that
version is around 23% faster than bog-standard tango.io
Thanks for giving it a whirl, tohru :)
p.s. perhaps Andrei should be using tango for processing those vast
files he has?
More information about the Digitalmars-d
mailing list