Speed

It is often assumed by outside parties that Python must, by its very nature (interpreted language) be slow. These people do not realise how much of the standard code are just wrappers around low-level C libraries. So much of the time everything is running flat out.

This point keeps resurfacing on comp.lang.python during optimisation discussions; particularly when somebody is surprised by how fast their code runs.

  • General rule: Optimisation is not required as often as you might think.

  • When it is requires, profiling almost always identifies the real culprit fairly quickly and, with practice, you can tell whether a local optimisation is going to fix it or (if the times are spread out over a number of files) whether it is algorithm redesign time.