Python optimizations are not deep and/or broad. I did not mean "very fast" as in "compilation speed."
Python does not attempt to apply anything more complex than that peephole optimizer, whatever that means.
Judging from my experience with Python, that peephole optimizer cannot lift operations on "dictionary with default value" to a regular dictionary operations using conditionals. I had to manually rewrite my program to use conditionals to recover it's speed.
Python does not attempt to apply anything more complex than that peephole optimizer, whatever that means.
Judging from my experience with Python, that peephole optimizer cannot lift operations on "dictionary with default value" to a regular dictionary operations using conditionals. I had to manually rewrite my program to use conditionals to recover it's speed.