4 ms·
I understand the notion of a "runtime" in the compiled language case; my question is about the distinction between an interpreter and a runtime in the interpret
by throwaway894345 7y ago
I understand the notion of a "runtime" in the compiled language case; my question is about the distinction between an interpreter and a runtime in the interpreted language case. Perhaps out of naivety, I would think that the interpreter is the runtime--the interpreter manages the call stack, memory, etc.
- PaulDavisThe1st 7y agoWell, 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?