22JAVASCRIPT 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 languages, such as the C and Rust programming languages, are designed to express exactly those things that the machine is known to be good at. This makes them easy to compile efficiently. JavaScript is designed in a very different way, focusing on simplicity and ease of use instead. Almost none of its features correspond directly to features of the machine. That makes JavaScript a lot more difficult ...

Get Eloquent JavaScript, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.