Python too slow?

Steven D'Aprano steve at
Sat Jan 12 03:52:33 CET 2008

On Fri, 11 Jan 2008 09:55:08 -0800, sturlamolden wrote:

> It seems the code he is referring to is doing k-means clustering on each
> frame. The clustering is done by from SciPy's cluster module, which is
> doing 'vector quantitization'. The algorithm is written in plain C. It
> is not Python that is slow. It is the amount of processing done on each
> frame. As the bottleneck is already in C, it cannot be done any faster
> without radically changing the algorithm and/or the hardware.

Thank you for taking the effort to actually investigate the OP's *actual* 

Such a pity that the chances are he's probably gone away in disgust at 
the pedantry and insults in this thread. He'll probably become another 
one of those people convinced that Python is "slow" because it's 
interpreted when in fact this is an example of C being slow in spite of 
being compiled.


More information about the Python-list mailing list