Victor Stinner on Performance
Get an expert opinion on the concepts you learned in this chapter.
We'll cover the following...
Asking an expert
Following is a conversation with an experienced Python developer Victor Stinner on the topic Performance.
Victor Stinner
Q: Hi Victor! Could you introduce yourself and explain how you came to Python? |
---|
A: Hi, my name is Victor Stinner, I am working for Red Hat on OpenStack, and I have been a CPython core developer since 2010. |
I was always programming. I tried a wide range of programming languages from the lowest level Intel x86 assembler to high-level languages like Javascript and BASIC. Even if I now really enjoy writing C code for best performance, Python fits my requirements better for my daily job. Since it is easy to write Python code, and I am not annoyed by memory management or analyzing crashes, I use the “free” time to write more unit tests, take care of the coding style, and do all the tiny stuff which makes software into a “good software”. |
After 10 years of professional programming, I can now say that I spent more time reading “old” code and fixing old twisted corner cases, than writing new code from scratch. Having an extensible test suite makes me relaxed. Having to work under pressure without a net is likely to lead to burnout, or more simply to quit a job. |
Q: I completely agree. You spent so much time analyzing performances around Python. How does having a test suite help with that? Are there any other sound habits that can help with profiling or code optimization? |
---|
A: I spent multiple months experimenting with large Python changes to globally optimize Python, but my work was quickly blocked by the benchmarks. CPython had a benchmark suite called “benchmarks” made up of 44 benchmarks, but |