3 ms·
Well, imagine for example that you wrote this in python: s = "hello" + "world" You could measure the execution of the internal representation of this, and
by PaulDavisThe1st 7y ago
Well, imagine for example that you wrote this in python:
s = "hello" + "world"
You could measure the execution of the internal representation of this, and that would be all about the speed of the interpreter.
At some point, something may have to clean up temporaries and that may happen asynchronously with respect to the actual statement execution. Yes, it happens in the same process as the interpreter's execution of the code, but it's a theoretically "optional" cost that has no specific relationship with the statement.
There are interpreters, for example, where you can disable garbage collection. If the overall execution time decreased, it's not because the interpreter got faster, it's just doing less of the "runtime" work.
- throwaway894345 7y agoSo is there anything besides the GC which satisfies this definition of "runtime"? What other asynchronous activities are going on apart from those of the Python program itself?