back to article Google's revamped JavaScript engine cures Chrome's stutters

Google has begun testing a new version of its V8 JavaScript engine for the Chrome browser that improves application performance by executing and compiling JavaScript code at the same time. "Concurrent code compilation is another step towards reducing latency in Chrome and is part of various ongoing efforts to deliver more …

COMMENTS

This topic is closed for new posts.
  1. Anonymous Coward
    Go

    Trying it now

    Seems a little zippier. Not bad. Definitely Chrome was needing a little more pep recently.

    1. Anonymous Coward
      Anonymous Coward

      Re: Trying it now

      It sure does. The last 4 major releases of IE have all beaten the most recent version of Chrome at the time on benchmarks like Sun Spider.

      1. Anonymous Coward
        Anonymous Coward

        Re: Trying it now

        I would be a moron be all [citation needed] (because how hard is it to post a frigging link to prove your claim, the burden if proof is on you at this point) but then again I would also point our that benchmarks are easily swayed. Either way If your decision to use any browser hinges on benchmarks you need to re-think some major life decisions.

  2. Anonymous Coward
    Anonymous Coward

    Enter the virus ware?

    This engine is the major line of defence against attack.

    I hope they ensure it performs as before otherwise we get the added unknowns of Windows type systems.

    Those other more low level access systems are resorting to locking out protection so as to appear safe. Out of sight out of mind is that feel good policy crap.

    1. Anonymous Coward
      Anonymous Coward

      Re: Enter the virus ware?

      "otherwise we get the added unknowns of Windows type systems."

      At least it's not as bad as with say a Linux based system. Just look at the Android malware fest.

  3. bobcaruthers

    Warm up your engines

    So if the V8 / Crankshaft engine only does the optmized double compilation on code that it thinks is run often, then to speed up my javascript apps I should call all functions a few thousand times (like warming up an engine) before the app starts, to force the browser to apply the optimized compilation to everything.

    A page takes a few seconds to load, so maybe I should spend those seconds on looping through function calls while I wait for assets to load?

    Also, I wonder if it can detect the same library version (say a version of jQuery) when it is included on multiple tabs or URLs, and use the same optimizations, rather than having to reanalyze it several times.

    Interesting..

    1. Anonymous Coward
      Anonymous Coward

      Re: Warm up your engines

      call all functions a few thousand times (like warming up an engine) before the app starts, to force the browser to apply the optimized compilation to everything.

      That would likely be very naive - a bit like adding indexes to every column in a database. I suspect that Google's engineers will have designed it with various heuristics that mean it will only ever perform optimisation for a subset of your code and to only consume a relative proportion of resources. You might be able to encourage optimisation of a few of what you consider performance critical sections of your code, but like all such optimisations it will be highly dependent on how the V8 engine is implemented. You'd be much better off trying to simplify your code rather than trying to game one particular JavaScript engine.

      1. bobcaruthers

        Re: Warm up your engines

        Yes I agree.

        But as with indexes on database columns, or manually inlining functions, it would be nice to have some control of where the optimization is done. There are many functions (say collision detection in a game) that don't get called all the time but would nice to keep super optimized and fast.

        1. Tom Chiverton 1

          Re: Warm up your engines

          That's what asm.js is for

  4. Anonymous Coward
    Anonymous Coward

    Sounds like the same principles used in Java's HotSpot virtual machine. It performs further optimisation on code that is being called frequently, although in the case of Java bytecode it's working on a much lower abstraction than JavaScript code. That said, with things like GWT, JavaScript is becoming more of an "intermediate" language than something you program directly in.

  5. roselan
    Pint

    Not the first

    Mozilla xMonkey do the same, more or less (post AOT compilaction for hot code), there is a blog post about it. It's to fridayly for me to bother to find it.

    Oh well, http://blog.mozilla.org/luke/2014/01/14/asm-js-aot-compilation-and-startup-performance/

This topic is closed for new posts.

Other stories you might like