Justin du Coeur (jducoeur) wrote,
Justin du Coeur

  • Music:

Massive Javascript performance improvements on the horizon

Web programmers should take a look at this article in Ars Technica, which talks about a radical enhancement that will be coming to Mozilla soon.

Summary: they're about to integrate trace optimization into the Spidermonkey Javascript engine. The underlying concept of this technique (assuming that I'm understanding it correctly) is essentially that it learns as it goes, making the program faster as it figures out how it really works in practice. This notion isn't quite as new as they make it sound, but this would be the widest deployment of it that I've heard about so far. In principle, it could eventually allow some Javascript programs to run *faster* than compiled code, because trace optimization can accomplish some speedups that compilers can't.

From the numbers they show, it looks like the new Javascript engine performs something like twice as fast in ordinary conditions, and up to 20-40 times faster in some cases. (Probably involving key loops that can be optimized well.) While that doesn't totally change the world yet, it's another key step in turning Javascript from an annoying and clunky toy into a language capable of serious work. And it means that, at least in Firefox, some complex web apps are about to get a speedup without having to do a thing. (It also means that the browser itself is likely to speed up in many places, because much of it is written in Javascript...)
Tags: technology

  • Ideas for fighting Fake News

    [I'm mostly just posting links over in Facebook, but my more technical friends tend to be over here.] Here is a really excellent collection of…

  • Damn

    *Sigh*. I was sure this was possible, and was thinking for the past two weeks that it was starting to feel likely, but was really hoping otherwise. I…

  • Time to change the name of the meme?

    From cnn.com today: 'Trump went on to again attack women who have accused him of sexual assault or misconduct, saying, "every woman lied when they…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded