[fpc-pascal] fast text processing
Vincent Snijders
vsnijders at quicknet.nl
Wed Oct 31 13:19:23 CET 2007
Bee schreef:
>> graemeg at graemeg:word_parser$ time ./project1
>> Word count:126944
>> Unique word count:11793
>>
>> real 0m0.185s
>> user 0m0.140s
>> sys 0m0.000s
>>
>> graemeg at graemeg:word_parser$ time perl project1.perl
>> Word count: 126944
>> Unique word count: 11793
>>
>> real 0m0.281s
>> user 0m0.244s
>> sys 0m0.016s
>
> Vincent said it was 3 times faster. I expected the result would be about
> 0.10s. Or am I wrong?
Maybe I have a relatively slow computer, so I get more speedup. Keep in mind, that
disk time is constant.
So for example, total time is disk time + processing time
For me:
StringList: 10 + 50 = 60
Hashtable: 10 + 10 = 20
Speedup: 3 times
For Graeme with his faster computer (2x processor time):
StringList: 10 + 25 = 35
Hashtable: 10 + 5 = 15
Speedup: 2.3
Please choose appropiate number to get to the result :-)
Vincent
More information about the fpc-pascal
mailing list