Why 'eval' makes JS the best language in the world
summary
Claim: using eval to assemble generated JavaScript makes building a fast emulator practical. A Spectrum emulator is generated by template functions that emit JS snippets assembled into one big function and evaled as the main loop. CoffeeScript multi line strings and interpolation simplify templating. The next step is to compile Spectrum code into native JavaScript by ordering snippets but RAM writes require invalidation so that part is unimplemented. Use of indirect eval avoids slow scoped eval and restores performance.
AI-written summary · about
chapters (5)
related talks
19mThe JavaScript Interpreter, Interpreted
31mJavaScript Compilation Techniques or "Wasn't JavaScript supposed to be slow?"
31mJavaScript Compilers For Fun and Profit
22mVirtual Machines, JavaScript and Assembler
29mJavaScript in JavaScript: Inception
45mEmscripten
29mExtreme JavaScript Performance
53mJS Fight: How I Wrote My Own eval()
