Hacker News new | ask | show | jobs
by Patient0 4866 days ago
I've always thought that this would be a better definition of what a "compiler" is vs what an "interpreter" is:

A compiler, if asked to "execute" itself a million times will generate code that is still reasonably fast.

An interpreter, if asked to "execute" itself a million times, will generate code that is a million times slower.

1 comments

Theoretically, one could write an interpreter specifically for the purpose of nesting other interpreters, which would then (nearly) remove itself from memory as it transfers control to the second interpreter, but I know I'm not quite insane enough to start working on such a thing.