News for hackers. Stuff that matters.
Re:Why I wrote a book about interpreters by benibela on Thursday December 01, 2016 @05:59PM (#13084401)
>Step 2. Write a program that operates on the data structure from (1) to execute the program. You just wrote an interpreter.

I did just that. The data structure matches the language exactly.

It is also slow.

The plan was to benchmark it and optimize the slowest parts, but they turn out to be all equally slow.

It is better to skip this step and directly create some byte-code or something. Probably less work than changing it later

Re:Why I wrote a book about interpreters by haberman on Thursday December 01, 2016 @06:17PM (#13084552)
Definitely. This wasn't meant to be an actual guide as much as a way of concisely explaining the terms. You'll almost always want byte-code of some kind if you want good performance.