New results from "dictionary word count" programs...

Shane Hathaway shane at
Mon Mar 20 17:24:44 MST 2006

Bryan Sant wrote:
> On 3/20/06, Nicholas Leippe <nick at> wrote:
>>Very interesting that C++ lost to a scripting language...
>>Way to go Python devs!
> Agreed.  Shane's submission was brilliant.  I was blown away at how
> fast python was at this task.  It scales well too.  The python code
> ran very fast against small files and large files (like the one used
> for this test).

Thanks, but the credit goes to the people who have optimized Python 
dictionaries so well.  Sometimes I wish such optimized code were 
available in plain C/C++.

There's still more fine tuning possible.  I've attached a version that 
shaves another second from the kjv100 test.

-------------- next part --------------
A non-text attachment was scrubbed...
Type: text/x-python
Size: 529 bytes
Desc: not available
Url : 

More information about the PLUG mailing list