Speeding Up Python

后端 未结 18 1194
无人及你
无人及你 2020-12-02 04:55

This is really two questions, but they are so similar, and to keep it simple, I figured I\'d just roll them together:

  • Firstly: Given an est

18条回答
  •  天涯浪人
    2020-12-02 05:40

    If using psyco, I'd recommend psyco.profile() instead of psyco.full(). For a larger project it will be smarter about the functions that got optimized and use a ton less memory.

    I would also recommend looking at iterators and generators. If your application is using large data sets this will save you many copies of containers.

提交回复
热议问题