Webkit Javascript Optimizing JIT compiler(s)

Is your JIT compiled javascript function running too slow?
No worries, just wait and the javascript engine will recompile it and then replace the function with a faster version!

But that’s not fast enough either?
Webkit will compile another version using more optimizations, using code from LLVM.

Is the function still executing some long running loop?
No problem! The javascript engine will copy all of the current state and build a new compiled function that starts at the beginning of that loop, then replace the old slower function with the new one, while it is still running!
It gets flipped over at the beginning of the next run through the loop.
(see the Hot-Loop Transfer section of the original article)

Just from the description, this sounds stupendously complicated. But the performance improvements are apparently quite considerable.

I’m truly impressed by the effort that goes in and the work that’s been done on this.

🙂

Read the original post for the full details:
https://www.webkit.org/blog/3362/introducing-the-webkit-ftl-jit/

 

This entry was posted in Internet Stuff, Macintosh, Writing Software. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *