Interpretation vs dynamic dispatch penalty in Python
问题 I watched Brandon Rhodes' talk about Cython - "The Day of the EXE Is Upon Us". Brandon mentions at 09:30 that for a specific short piece of code, skipping interpretation gave 40% speedup, while skipping the allocation and dispatch gave 574% speedup (10:10). My question is - how is this measured for a specific piece of code? Does one need to manually extract the underlying c commands and then somehow make the runtime run them? This is a very interesting observation, but how do I recreate the