Python performance characteristics

前端 未结 6 376
再見小時候
再見小時候 2020-12-08 03:23

I\'m in the process of tuning a pet project of mine to improve its performance. I\'ve already busted out the profiler to identify hotspots but I\'m thinking understanding Py

6条回答
  •  春和景丽
    2020-12-08 04:08

    The speed of your code might be automatically improved by using the Psyco module.

    As for Numpy, it generally speeds things up by a significant factor. I consider it a must when manipulating numerical arrays.

    You might also want to speed up the critical parts of your code with Cython or Pyrex, which allow you to create faster extension modules without having to write a full-fledged extension module in C (which would be more cumbersome).

提交回复
热议问题