Read text file fast, how?

Jesse Phillips via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 26 12:04:02 PDT 2015


On Sunday, 26 July 2015 at 14:36:09 UTC, Johan Holmberg wrote:
> C++ with <stdio.h> style IO:    0.40s
> C++ with <fstream> style IO:   0.31s
> D 2.067                                    1.75s
> D 2.068 beta 2:                        0.69s
> Perl:                                         1.49s
> Python:                                    1.86s
>
> So on Ubuntu, the C++ <fstream> version was clearly best. And 
> the improvement in DMD 2.068 beta "only" a factor of 2.5 from 
> 2.067.
>
> /johan

It would be better to compare with LDC or GDC to match the same 
backend as C++. That is a little harder since they don't have 
2.068 yet.


More information about the Digitalmars-d mailing list