Python / C: small runtime difference?

Martin Schneider martin.schneider at
Tue Sep 9 12:53:20 CEST 2003

One step ahead: My test program sorted a two-dimensional array containing
pairs of a string and a long integer, and the strcpy routine seems pretty

After reducing the problem to numerical sort only, I could improve the
relation to 1:50.

Is this a normal ratio?


> The Python Bubblesort runs 103 seconds, the C extension Bubblesort runs 28
> seconds, this is about 1:4, which is far worse than I expected (assumed
> about 100:1 or alike).

More information about the Python-list mailing list