4 ms·
>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 structur
by benibela 10y ago
>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
- haberman 10y agoDefinitely. 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.