◐ Shell
clean mode source ↗

Message 223215 - Python tracker

The opposite argument might be relevant too: in some cases, a tracing JIT compiler seeing a long block of code might perform artificially worse.  If each repeated line creates a branching path with two outcomes of roughly equal likeliness, then if the line is repeated 20 times, the JIT will need to compile 2**20 different paths before it has fully warmed up.  In practice, it will never fully warm up and will run with the constant huge overhead of finding and compiling more paths.