Wednesday, December 10, 2014

Caching JIT code

Javascript are a fundamental part of the web. Almost all popular browsers nowadays use a JIT compiler to compile Javascript code before executing it. For often visited sites, this seems like a waste of time and processing power: while the browser cache makes sure that those scripts do not necessarily have to be repeatedly fetched over the network, they still have to be compiled every time.

This may change in the near future. Even though not activated by default yet, you can take code caching out for a spin by starting the newest Chrome Canary on the command line, with the option

--v8-cache-options=code

or

--v8-cache-options=code-compressed

You can get a rough idea of what is happening if you add

--js-flags=--profile-deserialization

Give it a try!

No comments:

Post a Comment