Number of distinct substrings of a string [continuation]
bearophileHUGS at lycos.com
Sun Nov 29 14:15:14 CET 2009
> my home tests proved Python is a fellow fast beast of C++.
> Quite unexpected (I expected Py would be by ~10 times slower).
> Both my codes are identical in their algorithms.
> 0.016 0.0150001049042 <--- exec times
Maybe in your C++ code there's something that can be improved, this is
a 1:1 translation to D (V.1) language (using dlibs) and it's about 2.2
times faster than the Psyco version:
Using a smarter usage of memory (that is avoiding all or most memory
allocations inside all loops), the performance difference will surely
More information about the Python-list