2 ms·
Isn't much of the engineering of a compiler the same, regardless if machine code or intermediate VM code is emitted?
by MichaelGG 16y ago
Isn't much of the engineering of a compiler the same, regardless if machine code or intermediate VM code is emitted?
- kingkilr 16y agoJust outputting something isn't particularly different whether it occurs at runtime or "compile" time. However, if you want to know how to execute Python efficiently that's a very different topic than how to execute C efficiently.
- itsnotvalid 16y agoIf anything has to be language/platform/framework specific, it would not be at the compiler level. There are just some many things that could affect the performance of some code, it would be naïve to simply looking at things on compiler level.
- kingkilr 16y agoI was speaking more generically about a highly dynamic vs a highly static language, using Python as an example. The same comment applies to Ruby or Javascript.
- itsnotvalid 16y agoYes you are right. So in general we should read this book.
- kd0amg 16y agoMaybe sibling is referring to an aspect of Python I'm not aware of (there are probably many), but much of the book (or at least the first edition) is language-agnostic. Tasks are pretty well partitioned into front-end, optimization, and back-end sections (further, really), with the idea that each segment of the compiler doesn't have to worry much about other segments' tasks (e.g. code shape is not the concern of the parser).