Google Turbocharges JavaScript’s Performance

By | May 7, 2012 | 25 Comments


Google Turbocharges JavaScript's Performance

Google Chrome 19 and 20 users to benefit.

When it comes to performance, there is no such thing as “fast enough”, as a result, the search giant has decided to sprinkle some magic dust onto their JavaScript’s engine (V8) algorithm, which will now decide what functions should be optimized and give you a nice performance boost in return.

According to the official blog post, this is especially great for the small JavaScript programs. For example: since SunSpider benchmark is a compilation of small tests, Google Chrome 19 was able to outperform Chrome 18 by as much as 25%.

Google Turbocharges JavaScript Performance

How exactly does it work? Turns out, V8 will now analyze JavaScript program’s source code, look for performance bottlenecks and then make sure that its compiler’s efforts are put where they matter. If that does not exactly satisfy your knowledge needs, head over to the following post for more details.

The good news? It’s already integrated into the beta and alpha builds.

[Thanks, Blake, Hiram]


About (Author Profile)


Vygantas is a former web designer whose projects are used by companies such as AMD, NVIDIA and departed Westood Studios. Being passionate about software, Vygantas began his journalism career back in 2007 when he founded FavBrowser.com. Having said that, he is also an adrenaline junkie who enjoys good books, fitness activities and Forex trading.

  • Yoyo

    Does Chromium 20 have this feature or do I have to download Chrome beta for this ? let me know cheers ……..

    • http://www.favbrowser.com FavBrowser.com

      v20 has it too

  • Conan

    Look, an approximately 40 millisecond increased in speed! The mutant humans with super eyes and hyper reflexes will be able to tell the difference. Lets tell the world of our improvement and make them use Chrome.

    • Guesty Guest

      Haha! I completely agree with you Conan. You look at the results of a Javascript performance benchmark on TomsHardware Web Browser Grand Prix and it looks impressive until you release that all that separates first place from last place is less than half a second, and that the slowest browser still completes the tasks in under 0.8 seconds. That’s still pretty quick in my book.

      • Sarjoor

        But when you add up lots of slower times together, for example on work/Javascript heavy real world websites GMail, maps, webmails, Facebook, etc. then the slowest browser definitely displays and updates noticeably slower even to normal regular humans with average eyes and simple reflexes.

      • apád anyád

        Every bit of improvement is useful, even if not noticeable at all circumstances. At cases like this, it really can help.

  • greg 8-)

    Oh come on Firefox! I need this type of speed!!. Chrome gets it.

    • CanUHandleTheTruth?

      Firefox need to be fast so people can download IE faster :)).

      • apád anyád

  • http://abaixodecao.blogspot.com/ Vítor I

    40 millisecond increased in speed, and terrible super ugly jaggy font rendering! 

    • Hiram

      Go slap your mother for me.

      • CanUHandleTheTruth?

        She is your mother too…… shaem on you man shame ……

  • I’m still NoBody!

    Well, anyway, it’s a good spin by Google – people love seeing something about improved javascript speeds… but in my book – it’s still a while… before Google can claim the title as the Bugatti Veryon of browsers.
    For now - it’ll have to do with a title of an overwieght / hyped Corvette - with still too many mechanical issues to fix…

    Google may be fast in certain areas and not surprisingly in javascript tests they have, somehow, been involved in – but in other areas (Real Life Surfing) Google - most of all – reminds me of a coal undernourished steam engine with the worlds most lazy “V8 dude” stoker onboard

    • Hiram

      You’ve said a whole lot without actually saying anything. Exactly how is improving the speed of their javascript engine a spin? The performance of pretty much their entire consortium of web apps(Chrome OS, Gmail, Google Drive, Google Docs, Google+ etc.) depends on the speed of javascript engines, so it’s really not all that surprising that they would strive to improve V8′s. Also, would you be kind enough to provide us with a list of these many mechanical issues that you’re talking about? And in regards to “real life surfing”, which browser do you suppose is the fastest? It sure as shit ain’t Opera.

  • I’m still NoBody!

    So you clearly felt the speed improvements – or did you need to read about them first beforeyou suddenly did??
    “web apps(Chrome OS, Gmail, Google Drive, Google Docs, Google+ etc.)” – in the part”You’ve said a whole lot without actually saying anything” – I think that is indeed what Ipointed to-> Google tests / apps?? – fast yes…But my idea of “Real Life Surfing” is NOT only limited to Google Products!? Again, did you reallyfeel the speed improvements on anything else than… possibly google apps?? I sure didn’t… but it sounds great… a real catch phrase, one might even feel tempted to say…

    “Also, would you be kind enough to provide us with a list of these many mechanical issues that you’re talking about?”

    “http://code.google.com/p/chromium/issues/list?can=2&q=stars&sort=-stars+-area+-id&colspec=ID Pri Mstone ReleaseBlock Area Status Owner Summary Stars”

    (remember to get every thing within the ” ” marks)
    Things to notice: (you may need to login to Chrome issue tracker to view it)

    Issues are sorted by most stared.Age of the top most plague-issues for Chrome.MileStone-Fix – or complete lack of same for virtually all of them??

    Some time ago I ran into the same problem as this person reported here:(if you download the testcase provided – remember to add a

    http://code.google.com/p/chromium/issues/detail?id=35980

    Now, you tell me of any modern browser that has gotten to be 18-20 version “old”,if you wish, that fails such simple functionality?? – and if you are into web dev.at all – you’ll know (too)… there are waaay too many such cases on the Chrome issue tracker page, “Chrome fails to show image…etc, etc…” – simple stuff and yet… for Pete’s sake!!
    “And in regards to “real life surfing”, which browser do you suppose is the fastest? It sure as shit ain’t Opera.”

    I’ll say it again… Google may be fast in certain areas - but it sure is, at best, only half-baked as a complete product!? Otherwise, I would point to FireFox Nightly (ver. 15.0a1) and even IE10 latest dev build… for “Real Life Surfing” – and I expect even more from IE10 when its final.For offline browsing / testing (dev. phase) – it sure as shit IS Opera.

    • I’m still NoBody!

      On the first link – copy shortcut and add the remaining after ID: ” Pri Mstone ReleaseBlock Area Status Owner Summary Stars” – without qoutation marks…

    • Hiram

      First of all, they didn’t advertise this improvement anywhere besides the chromium blog so you calling it some sort of a PR spin is just absolute bullshit. Who said anything about feeling it? It’s an incremental javascript performance improvement, a whole bunch of them do add up and when they do, then you can feel them. Whoopdiefuckingdo you found the chromium bug tracker and selected one bug that you deemed significant. Firefox has thousands of them. And what exactly is the basis of saying that the latest Firefox nightly and IE consumer preview versions are the fastest for “real life surfing”, have you done any benchmarks? of course you haven’t. And even if they were the fastest which I’d be willing to bet their not, they would still hardly qualify as they aren’t even stable software yet. And Opera sure as shit ain’t the fastest for “real life surfing” as the position:fixed property bug pretty much takes a shit on ones web browsing experience in any websites that use that particular property like theverge or cnet for example.

      • I’m still NoBody!

        First, pardon for the no good layout of my answer to you, hope this one is better… 

        I didn’t only put in one example… the one I did I deemed an embarrassment and there are many of those Google only issues in there – things that, otherwise, works fine in Safari and all other browsers for that matter.

        “Whoopdiefuckingdo you found the chromium bug tracker”Yes, I did – did you bother to see how out-of-sync. they are with users in terms of what they are fixing and what not? (in regards to examples)
        And yes, thank you, I am well aware of major browser bug trackers and that most of them tends to act on highly-rated user issues – and yes, I know there are more issues reported on IE as well as FireFox – they are also older browsers…

        You argue for future improvements to be felt, I for the ones in Chromium as it is now.

        “have you done any benchmarks?”Yes, I have… and Chrome is not the fastest browser in those according to its dev tool compared to other browser dev. tools.
        Then I also did something that seems to have completely eluded you, aplying common sense and how does this browser feel in terms of responsiveness and overall performance – and I don’t need a stopwatch to tell me that. I pity those who rely heavily on weird javascript tests to tell them if a browser is actually fast or less in terms of “Real Life Surfing”

        “And Opera sure as shit ain’t the fastest for “real life surfing””
        Again… For offline browsing / testing (dev. phase) – it sure as shit IS Opera.

        “they would still hardly qualify as they aren’t even stable software yet”
        You know as well as I do – they are perfectly stable enough to be used as default
        browsers – that especially goes for FireFox Nightly – and what does it really mean
        when a browser is stable-> that features implemented are flawless and the browser is completely bug free?? In essence there is no such thing as a stable browser only in the minds of marked-droids and die-hard fan boys.

        “they didn’t advertise this improvement anywhere besides the chromium blog”
        Well, are you under the impression that only you and I read that??
        Goes without saying, they don’t need a “Breaking News” segment on CNN to get this out.

        • Hiram

          OK, you deemed it an embarrassment – I’d be willing to bet that most people couldn’t care less about that bug. And you saying that Chrome has Chrome specific bugs is also very funny… yes, applications have bugs that don’t also affect other applications. That’s not exactly a Chrome specific issue, is it now? Also, claiming that they are out of touch with their users and are not fixing the right bugs is fairly ridiculous as judging from their ever growing market share it would seem that they are giving them exactly what they desire. In regards to the benchmarks that you’ve done of IE10 beta and the latest Firefox nightlies, would you be kind enough to share them with us? And to your argument that “they feel faster”, it’s no real argument at all actually, it’s simply your subjective experience which can be influenced by many things and is of no objective value what so ever. Opera is good for offline browsing? fantastic, I gotta ask you though – what percentage of people are actually interested in how well a browser works for browsing offline. And IE10CP and Firefox 15 nightlies are stable enough to be used on default? are you kidding me? Win8 is still in a beta phase and should not be used by any sane person as a default productivity OS and so far the IE10CP is only available on that one specific OS. And one Firefox nightly build might be stable, while the next could possibly not even launch so my argument still very much stands in this respect. And you should probably read as to what a PR spin actually is: http://en.wikipedia.org/wiki/Spin_(public_relations) They didn’t twist some information for their own goals, they just simply informed us that they improved the speed of their javascript engine – that is all. I honestly don’t see as to how you could possibly interpret it any other way.

  • I’m still NoBody!

    Oops…. on the test case thing: “remember to add a….” DOCTYPE HTML

  • I’m still NoBody!

    “Opera is good for offline browsing? fantastic, I gotta ask you though – what percentage of people are actually interested in how well a browser works for browsing offline”

    You may wanna take a look at this: http://code.google.com/p/chromium/issues/detail?id=47416 My answer – by far the most people, in fact I think you are one of only few who don’t mind – and firmly believes in this so called Chrome “improvement…….ehh?”
    It’s a brilliant case of spectacular brain spasm hitting a few google devs. – many posts to read includeing the merged-into ones.
    Classical Google – lets do absolutely NADA about it-> stonewall it… same goes for the tiny example I provided, indifference spiced with arrogance, now and then. Go in there and familiarize yourself a little better with their issue tracker and it’s contents. Enjoy…

    “yes, applications have bugs that don’t also affect other applications. That’s not exactly a Chrome specific issue, is it now?”
    Testcases on issue tracker marked OK: Saf, IE, Opera, FF / FAIL : Chrome = Google specific errror… yes??

    “…ever growing market share it would seem that they are giving them exactly what they desire”
    On a VERY good day I will grant you, that Chrome has been flucturating a wee bit lately, otherwise, I would say according to statistics posted on this site, Chrome has stabilized – about a year ago… give or take.
    On technical merits Chrome should not do much better than Safari – when it does, anyway, I believe it is primarily due to the same reason as that of IE. Both browsers have the advantages of reaching out to the masses – One being bundled into the OS – the other visible on Google search engine, Google Apps (those you mentioned) and when installing Google Earth.

    “And IE10CP and Firefox 15 nightlies are stable enough to be used on default? are you kidding me?”
    No! – not at all I have done that using FF, opera and guess what – Chromium too sometimes, for the last 3+ years… and I do not recognize a pattern of constant crashes all the time??

    “And one Firefox nightly build might be stable, while the next could possibly not even launch so my argument still very much stands in this respect”
    That is a completely out-of-proportion doomsday scenario you paint here – and might I add 99.9999% wrong! Again, a stable browser guarantees… N-O-T-H-I-N-G! Nightly FireFox = Stable browser base version + a fraction of the latest html,js,css,security functionallity added! How difficult can it be? And we all know that every single website out there – are full of these latest web-enhancements, right??… blaaaaah

    About Windows 8 – I am not gonna get into any discussion on that, but I will repeat that IE10 IN ITSELF is stable enough to use – regardless of the overall status of Windows 8! If it was such a crashing disaster as you hint – don’t you think we would have heard about by now?? Have you even tried it, btw?? or is this mostly Windows/IE= BAAAAD??

    Now you want me to post links… It would fairly easy to find 10 pages where FireFox out-performees Google, but my problem is, that it would be just as easy for you to present 10 other showing Chrome having the upper-hand, and very likely it would be possible for a third person to show IE10 performing rhw best! So that brings us nowhere.
    Now if posted some comparison data – what are the chances, I wonder, of you then telling me that FireFox/FireBug and IE do NOT measure javascript performance correctly… only Chrome does??

    So Instead… Add this code to a new html document.
    Now I am sure we can agree, that it is not especially biased towards any browser??
    function bench(){
    var startTime,endTime,x=1000000;
    startTime=new Date().getTime();
    do{
       document.write(” “);
      }
    while(–x);
    endTime=new Date().getTime();
    alert(‘Elapsed time: ‘+((endTime-startTime)/1000)+’ seconds.’);
    }
    bench();

    Choose any version you wish of your nuclear-fusion-powered-speed-monster – Chrome / Chromium. When testing->if it asks if you want to “kill page” or “wait”-> choose wait. As you can see by the simpleness of the example it will eventually finish…
    Now, try FireFox 12 Stable or any versions of Nightly / Aurora for that matter… Code that performes better on other browsers is not an issue and plain logic dictates that there are probably millions of webpages that performes better using another browser. Of course Google is in their every right to flex their relatively tame V8 muscle – just don’t live under the illusion of, this browser for the past 1½ year have had any particular unique characteristics, because it hasn’t. It’s a fine browser but that’s pretty much IT!!
    Stating Google friendly developed sites / apps / tests… hardly qualifies for an objective take on general web performance for plain normal browsing on your everyday sites.

    • Hiram

      I was writing this fairly large response to your comment when the installation of Opera 12 that I was writing it with crashed(Opera 12 blows by the way in regards to stability and usability). I’m too tired to write a new one now and It’s around 2 am where I live so you’ll get your response in around 10-12 hours.

    • Hiram

      “You may wanna take a look at this: http://code.google.com/p/chrom… My answer – by far the most people, in fact I think you are one of only few who don’t mind – and firmly believes in this so called Chrome “improvement…….ehh?”It’s a brilliant case of spectacular brain spasm hitting a few google devs. – many posts to read includeing the merged-into ones.Classical Google – lets do absolutely NADA about it-> stonewall it… same goes for the tiny example I provided, indifference spiced with arrogance, now and then. Go in there and familiarize yourself a little better with their issue tracker and it’s contents. Enjoy…”

      1. You don’t seem to realize that the people voicing their opinions on the issue tracker are not the majority of Chrome’s users, but rather, the vocal minority. And that specific issue that you have linked to is hardly as one sided and you proclaim it to be as the solution to that issue from my understanding included a security compromise that maybe google is just not willing to make. And I don’t really see why you keep going back to the issue of the bug tracker as it’s honestly not something that’s going to persuade me one way or another.

      “Testcases on issue tracker marked OK: Saf, IE, Opera, FF / FAIL : Chrome = Google specific errror… yes??”

      2. Well, yes, that is pretty much the text book definition of an application specific bug, as I’ve already said – it’s a bug that only affects a specific application, probably every piece of software ever written has them.

      “On a VERY good day I will grant you, that Chrome has been flucturating a wee bit lately, otherwise, I would say according to statistics posted on this site, Chrome has stabilized – about a year ago… give or take.On technical merits Chrome should not do much better than Safari – when it does, anyway, I believe it is primarily due to the same reason as that of IE. Both browsers have the advantages of reaching out to the masses – One being bundled into the OS – the other visible on Google search engine, Google Apps (those you mentioned) and when installing Google Earth.”

      3. By most estimates Chrome’s market share has not stabilized and has in fact continued to grow: http://en.wikipedia.org/wiki/Usage_share_of_web_browsers#Historical_usage_share And on technical merits Chrome is actually far more advanced than Safari as it has far better HTML5 specification support, it’s a lot faster, it’s more secure and it has more features. Also, even if the laymen were convinced by the marketing to try out Chrome, it would still have to provide them with a positive impression for them to continue using it, because if they did get an impression that it’s not as good or better than their previous browser they would simply go back to it.

      “That is a completely out-of-proportion doomsday scenario you paint here – and might I add 99.9999% wrong! Again, a stable browser guarantees… N-O-T-H-I-N-G! Nightly FireFox = Stable browser base version + a fraction of the latest html,js,css,security functionallity added! How difficult can it be? And we all know that every single website out there – are full of these latest web-enhancements, right??… blaaaaah”

      4. What you said here is very silly. Beta/Alpha/Pre-Alpha/Milestone versions of software all generally tend to include experimental features and because those features are experimental by their very nature they tend to not be stable. A stable version doesn’t only mean that a piece of software isn’t going to crash as much, it means that is has reached a level of stability, usability and completeness that is good enough for it to be used on default in a productive environment.

      “About Windows 8 – I am not gonna get into any discussion on that, but I will repeat that IE10 IN ITSELF is stable enough to use – regardless of the overall status of Windows 8! If it was such a crashing disaster as you hint – don’t you think we would have heard about by now?? Have you even tried it, btw?? or is this mostly Windows/IE= BAAAAD??”

      5. I’m not claiming that it’s a crashing disaster and even if it was it’s still beta quality software so there would hardly be any outpouring of news about it. What I am saying is that because it’s still beta quality software it’s not finished and should not generally be used in a productive environment as a default browser. And I have nothing against IE or Windows, I happen to think that IE9 is a pretty damn good browser and Windows has generally been my default and only operating system since I first gotten a PC.

      “Now you want me to post links… It would fairly easy to find 10 pages where FireFox out-performees Google, but my problem is, that it would be just as easy for you to present 10 other showing Chrome having the upper-hand, and very likely it would be possible for a third person to show IE10 performing rhw best! So that brings us nowhere.Now if posted some comparison data – what are the chances, I wonder, of you then telling me that FireFox/FireBug and IE do NOT measure javascript performance correctly… only Chrome does??”

      6. Well, the thing is, tomshardware’s grand prix has generally proven that Chrome is the fastest on the most synthetic performance benchmarks. And also, you seem to have a very different impression of me than you perhaps should as I am by no means a fanboy for Chrome, Opera is and has been my default browser for many many years now.

      “Code that performes better on other browsers is not an issue and plain logic dictates that there are probably millions of webpages that performes better using another browser. Of course Google is in their every right to flex their relatively tame V8 muscle – just don’t live under the illusion of, this browser for the past 1½ year have had any particular unique characteristics, because it hasn’t. It’s a fine browser but that’s pretty much IT!!Stating Google friendly developed sites / apps / tests… hardly qualifies for an objective take on general web performance for plain normal browsing on your everyday sites.”

      7. Sure, some codes performs better on some browsers – that premise that does elude me. However most websites that I visit generally perform better on Chrome that on any other browser. And most modern websites in general seem to run the best on Chrome, this however is obviously a subjective opinion. Also, Facebook which I don’t really visit is a good example of a website that performs fantastically well on Chrome and is more of an enemy than a friend of Google.

  • I’m still NoBody!

    A somewhat delayed answer…

    Heheh…I’ll reveal a little secret – when I was about to post my answer to your first post in here – upon submit IE9 crashed so I had to re-write it all.

    Now I am going try to respond with as short answers as I can – but I am *not* very good at that. :- I probably disagree the most with you on 1.
     
    1. I go back to the issue tracker for the following reasons.
    If you want to find debates on the internet about Chrome you do not really need me to post links , you can easily find them yourself. Now I chose issue tracker because Google have been “so kind” (on a large part) to remove posts like: “Google Sucks! Fuck Chrome!!!!”, “www.blah-blah.com” doesn’t work in Chrome” without any consideration to – maybe it’s the code on blah-blah.com that’s bad – not necessarily Chrome, also on many forums posts tend to get hijacked by other issues. So it’s a “clean” place if you wish.
    I am not trying to “persuade you” but I will retain the right to post links that actually backs my case. If your entire case is build on the mere hopes that I cannot find links to back it up – you have a thin case. I seems to me, that you are somewhat stuck in the past regarding the speed of Chrome. True, there was a time prior to IE9 – when Mozilla had fallen asleep across their keyboards, Opera didn’t exactly hide they were mostly into optimizing their browser for low memory usage. Only Safari seemed to offer speeds of notice on core performance!

    Issues tracker: Lets just get that a few facts straight to begin with…
    The “crime” you are doing here, is reality distortion… factoring in numbers from the entire outside world that has absolutely no relevance for the issue tracker.
    The issue tracker is relevant for those with knowledge, interest and/or those with a desire to chance Chrome in whatever way – and that does certainly *not* cover Chrome’s entire share of users – not by a long shot!
    If your distortion picture were to bear any relevance of how to decipher the issue tracker, the outcome would be: reduce it to an internal Google tool!
    Firstly, how many posts are in there on *average* – that does *not* have status “Closed”?
    How do these issues measure against each other in terms of importance and votes?
    In your world – only 815+ have voted for issue 47416 out of millions upon millions of users for whom the issue tracker is of complete irrelevance, anyway…
    In my world – issue 47416 has now risen to be the third most voted-for issue and within a year – likely theeee most “pain-in-the-ass” voted issue (needs > 2000+ votes) of concern to devs/users of all kinds. That’s how you should interpret it!
    Security?? – I am not gonna do much of this since it is of course not your job to now defend Chrome here – but I will briefly say, In post 1 a dev. tells how to circumvent it (however, troublesome in the long run that is), so not *that* security related, rather a case of indecisiveness that’s become too often.

    2. This is what you posted: “yes, applications have bugs that don’t also affect other applications. That’s not exactly a Chrome specific issue, is it now?”
    I am not really sure what you mean there – its seems contradictory… Thought perhaps something was missing – or you are talking about Google apps, which I am not…
    So, I basically answered by asking – if we are talking about the same thing.

    3. This is more difficult to relate to. I chose to reduce the scope (and I probably should have mentioned that) to this link

    http://marketshare.hitslink.com/report.aspx?qprid=1&qpwidth=625&qpdisplay=0100&qpmr=10
    also being used on this site. Read here too

    http://www.favbrowser.com/microsoft-compares-net-applications-vs-statcounter/#more-11370
    Frankly I have no clue as what to believe in here. You can of course choose to believe in a chart that favours Chrome (more), I will stick to one which there seems to be – probably better weighted / filtered.

    4. I think I know where you are coming from here with this. Nightly browsers with experimental features are more likely to crash/misbehave due to these features – than stable browsers are on there finalized features??
    Now, I am inclined to partially agree with you here – *IF* the premise is ***only*** to test these new nightly feature(s). This does, however, not exclude stable browsers from also not crashing/misbehaving on say, javascript code they cannot yet intrepret!
    But I would remind you that a great… great many bug reports are filed on stable browsers – misbehaving / crashing on features – thought to be working, at the point of time when released in a stable version!
    And after all you *did* more or less project a 50/50 percent possibility of crash / misbehaviour (“…you never know if the next…) by nightly browsers – and that is completely an unrealistic projection. You wouldn’t be able to find a shred of evidence of something even remotely close to that statement.

    5. Yes, but what you forget here is that I never advocated for people to use Windows 8 as their primary OS but merely stated that IE10 – in itself – runs stable enough for common use.

    6. Tomshardware… yes. In recent times it seems to me just about any browser wins this, now and then, or tie for places. It could certainly do with a clean-up… testing for how fast browsers can
    open 8+ tabs and how much memory was used?? Hardware acceleration / WebGL solely depends on your GPU! Flash, Java and SilverLight are optional installs – last time I checked…
    Grand Prix is fun to read – but only some tests have some real relevance, for core browser performance.

    7. No comments… at all! :-)

    • Hiram

      We generally seem to have come to some agreement on most of these issues so there’s probably not much reason for either of us to continue posting these walls of text.