Python(2.5) reads an input file FASTER than pure C(Mingw)

SL ni at hao.com
Sat Apr 26 14:38:32 EDT 2008


"SL" <ni at hao.com> schreef in bericht 
news:bec2d$481372ed$541fc2ec$6742 at cache3.tilbu1.nb.home.nl...
>
> "n00m" <n00m at narod.ru> schreef in bericht 
> news:6a3f8226-04c6-4ee3-b5a6-f76aca44aa31 at a23g2000hsc.googlegroups.com...
>> using namespace std;
>> char vs[1002000][99];

>>        if (!fgets(vs[i],999,fp)) break;

BTW why are you declaring the array as 99 and pass 999 to fgets to read a 
line?





More information about the Python-list mailing list