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 established python project, what are some decent ways to speed it up beyond just plain in-code optimization?
Secondly: When writing a program from scratch in python, what are some good ways to greatly improve performance?
For the first question, imagine you are handed a decently written project and you need to improve performance, but you can't seem to get much of a gain through refactoring/optimization. What would you do to speed it up in this case short of rewriting it in something like C?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…