Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't much of the engineering of a compiler the same, regardless if machine code or intermediate VM code is emitted?


Just 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.


If 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.


I 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.


Yes you are right. So in general we should read this book.


Maybe 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).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: