You are here: Home > Dive Into Python > Performance Tuning > Summary | << >> | ||||
Dive Into PythonPython from novice to pro |
This chapter has illustrated several important aspects of performance tuning in Python, and performance tuning in general.
I can't emphasize that last point strongly enough. Over the course of this chapter, you made this function three times faster and saved 20 seconds over 1 million function calls. Great. Now think: over the course of those million function calls, how many seconds will your surrounding application wait for a database connection? Or wait for disk I/O? Or wait for user input? Don't spend too much time over-optimizing one algorithm, or you'll ignore obvious improvements somewhere else. Develop an instinct for the sort of code that Python runs well, correct obvious blunders if you find them, and leave the rest alone.
<< Optimizing String Manipulation |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | |
Further reading >> |