Chapter 22. Javascript and Performance

Running a computer program on a machine requires bridging the gap between the programming language and the machine’s own instruction format. This can be done by writing a program that interprets other programs, as we did in Chapter 11, but it is usually done by compiling (translating) the program to machine code.

Some programming languages, such as C, are designed to express exactly those things that the machine is known to be good at. This makes them easy to compile efficiently. But JavaScript is designed in an entirely different way, with a focus on simplicity and ease of use instead, and almost none of its features correspond directly to features of the machine. That makes JavaScript difficult to execute ...

Get Eloquent JavaScript, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.