313
edits
Line 52: | Line 52: | ||
=== Speed of first-run === | === Speed of first-run === | ||
Game developers are concerned about the time taken to compile large JavaScript codebases. | Game developers are concerned about the time taken to compile large JavaScript codebases. Note that there are two separate compilation stages: bytecode compilation (JS->bytecode), and native compilation (bytecode->native). Currently SpiderMonkey compiles all bytecode immediately when it is loaded by a page, but functions are native-compiled only after they have run a few times (or for a few loop iterations). | ||
We need data to show which compilation(s) are a problem. | |||
If it's bytecode, one solution is to compile the code as it is downloaded (bug on file?). Another is to parse only enough to get early errors, but not actually compile, making the front-end faster. | |||
Native compilation is difficult to make faster: there aren't necessarily any quick fixes. | |||
Ahead-of-time compilation or caching compiled code would address both issues. | |||
=== Management of large JavaScript codebases === | === Management of large JavaScript codebases === |
edits