Sturla Molden, 17.04.2011 20:24:
Den 17.04.2011 20:07, skrev Arthur de Souza Ribeiro:
I've profilled the module I created and the module that is in Python 3.2,
the result is that the cython module spent about 73% less time then
python's one, the output to the module was like this (blue for cython,
red for python):

The number of function calls are different. For nested_dict, you have 37320
calls per second for Cython and 59059 calls per second for Python. I am not
convinced that is better.

Note that there are 20000 calls to isinstance(), which Cython handles internally. The profiler cannot see those.

However, the different number of functions calls also makes the profiling results less comparable, since there are fewer calls into the profiler. This leads to a lower performance penalty for Cython in the absolute timings, and consequently to an unfair comparison.

Stefan
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to