How to accelerate this program?

Li Jie cpunion at gmail.com
Mon Apr 3 20:13:43 PDT 2006


In article <e0s9oi$1uih$1 at digitaldaemon.com>, BCS says...
>
>Wang Zhen wrote:
>  <snip>
>> 
>> BTW, a simple shell command "sort emails.txt | uniq > output.txt" can 
>> get the job done in a few seconds. I assume you went all the trouble 
>> writing a D version just for the fun of it. No?
>
>or
>
>sort -u emails.txt

Thanks.

I want to compare the speed of C++, D and python.

The best python version only takes 1700 ms, a "stand" c++ version (used
set<string>) takes 5000 ms, an optimized c++ version takes 680 ms.  I thinks an
optimized D version can faster, shorter and easier to write than the c++
version.





More information about the Digitalmars-d mailing list