Optimising Python dictionary access code

后端 未结 5 1756
迷失自我
迷失自我 2021-01-30 05:11

Question:

I\'ve profiled my Python program to death, and there is one function that is slowing everything down. It uses Python dictionaries heavily, so

5条回答
  •  醉酒成梦
    2021-01-30 05:47

    Have you considered Pyrex / Cython?

    It compiles python to C and then to .pyd automatically, so it might speed things up a fair bit without much work.

提交回复
热议问题