Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Google Technology

Google Quietly Posts Big JavaScript Engine Update 120

An anonymous reader writes "Google has updated the Chrome JavaScript engine from version 2.5 to 3.0, which apparently results in some big performance jumps. ConceivablyTech has run some benchmarks on two different PCs and posted charts showing that the latest nightly builds are up to 100% faster than the Chrome browsers with the JavaScript version 2.5 (which would be all currently published Chrome 8 and 9 variants). Especially V8 and Kraken seem to benefit from the upgrade, while Google has now at least on some system the fastest Sunspider browser again."
This discussion has been archived. No new comments can be posted.

Google Quietly Posts Big JavaScript Engine Update

Comments Filter:
  • continues.....
    • Re: (Score:2, Informative)

      by Anonymous Coward

      No.

      "The browser war continues"
      -or-
      "The browser wars continue"

      Either would be fine, but "The browser wars continues" is certainly not proper English grammar.

      Mod me as troll or whatever makes you feel better about yourself, but it doesn't make it any less true.

    • And google is definitely firing the first Salvos.

      They took out a full page ad in my college's newspaper. With just the chrome logo and a "Give the gift of ....." and then a link to google.com/chrome.

      Daily newspaper for a college campus of ~50,000 students. I know Firefox did the one ad a long time ago and I've never seen an Ad for IE. (other than MS in general). So Google is definitely going at this 'war' full force.

  • by Anonymous Coward
    This is the kind of competition we should see everywhere. Not just browser speeds.
  • by Anonymous Coward

    Can we come up with a standard way to convey the concept of speedup people? I have a feeling that they meant twice as fast. 100% faster would mean it finished instantaneously, which might be true if the benchmark was all marked as dead code... Oh, this is about google, not MS. My bad.

    • Re:100%! OMG (Score:5, Informative)

      by adisakp ( 705706 ) on Tuesday December 07, 2010 @03:44PM (#34479192) Journal

      Can we come up with a standard way to convey the concept of speedup people? I have a feeling that they meant twice as fast. 100% faster would mean it finished instantaneously, which might be true if the benchmark was all marked as dead code... Oh, this is about google, not MS. My bad.

      The article is correct: 100% faster is twice as fast. 100% less time would be instanenous.

      Say I drive from point A to point B and it takes 10 minutes. Now I repeat the route but I drive 100% faster -- the results is it only takes 5 minutes; I have doubled my speed and halved my driving time.

    • by AvitarX ( 172628 )

      I like this: www.youtube.com/watch?v=nCgQDjiotG0

      It has that whole library of congress per statue of liberty feel to it.

  • !quietly (Score:5, Informative)

    by yincrash ( 854885 ) on Tuesday December 07, 2010 @03:39PM (#34479096)
    this was part of their big chrome os announcement. i would say that is the opposite of quietly
  • by JSBiff ( 87824 ) on Tuesday December 07, 2010 @03:41PM (#34479134) Journal

    I realize that, from the baseline starting point of JavaScript interpreters in past years, there was a lot of room for improving the performance of JavaScript. But, when Chrome was first released, it boasted huge improvement in JS performance vs. other browsers, and it seems like every release since then has had these huge jumps in performance. . .

    Shouldn't we be nearing some sort of point of 'it's about as optimized as it can possibly be and still give correct results'? If it's true, it's great, but getting 80%+ jumps in performance every major browser release doesn't seem like it could possibly continue for too many iterations.

    • Haven't you SEEN that commercial where they shoot the potato through the dicer in front of the computer screen? That was close!

      I think they hope to have the page load before the table salt hits the apparatus.

    • Lets say a page takes a ridiculous 10s to run on the old browsers, Chrome comes out and takes 5s off that number so now it's 5s. Their next update manages to shave another 2s off, that's a 40% reduction right there, even though it's less than half the improvement the previous version gave. Then they shave another 1.5s off, the new engine is twice as fast. We look at things in ratios, which is the way it should be when looking at incremental improvements, but it means that when you're talking about fracti

      • This is a good point. 100% improvements should actually be easier as time goes on.

        • Re: (Score:2, Insightful)

          by Anonymous Coward

          Not true, it is just the other way around. As time goes by 100% improvements, even if it means little difference, becomes orders of magnitude harder to achieve.

          • Exactly. Going from interpreted to a (simplistic code generation) method jit is reasonably straightforward (assuming you know how compilers and assembly language works). From there, you can analyse the parts of the code generation that are slow and produce better code for them (e.g. using the INC operation for ++i instead of ADD 1). Then you need to start doing run-time hot-loop/hot-code optimisations on the fly which is what tracemonkey and this are doing. Getting this working is around the same complex
      • by JSBiff ( 87824 )

        Yeah, I realize the starting point was horribly bad, so I realize there's room for a few generations of 80-100% improvements, but it would seem like, at some point, you've found all the 'easy' optimizations, and it should start to get very hard to improve it further.

        Instead of thinking about TIME, let us think, for a moment, about OPERATIONS. A 100% performance improvement means that, in the same time, you do twice as many operations. So, you start out doing 1E6 operations/sec. You double that and you're do

        • As JS is a late bound language, the quality of implementation is largely dependent on its ability to analyze code and predict call targets and call environment in advance. While the idea itself is not new, it is a field where the real progress has only just started. There are likely still many undiscovered techniques at making that analysis better, and I would guess that it is what Google does.

          • Can't wait to start coding JS in Node.js for all my business needs!

            Kind of a joke, and not at the same time... I really like being able to do all the stuff JS allows (eg: lambda like functionality [not a fan of of the lambda syntax in C#]) but until recently it seemed speed was less than dirt in priority. If only they added a bit more sane (ie: built in) method of loading "libraries" besides XMLHttpRequest/eval()...

            • I really like being able to do all the stuff JS allows (eg: lambda like functionality [not a fan of of the lambda syntax in C#])

              Out of curiosity, why? It would seem to me that this (C#):

              (x, y) => x + y

              is much preferable to this (JS):

              function(x, y) { return x + y; }

              especially in the so common one-liner scenarios for lambdas. For multiline ones, the difference in syntax is really marginal - drop "function" and add "=>" between the parentheses and the curly braces, and that's it.

              Or did you mean the old C# 2.0 "delegate(...) {...}" syntax, which required fully spelling out parameter types? If so, there is no reason to keep usi

              • The delegate method was the one I was used to... the new one looks intriguing but => and >= feels like we are getting back into the whole C debate on >> usage and how a symbol mistake can change the meaning of the program more significantly than you may want. I assume (x, y)=>{x + y} is equivalent to what you have above? I might have picked another symbol other than =>... eh, it matters not.

                • => and >= feels like we are getting back into the whole C debate on >> usage and how a symbol mistake can change the meaning of the program more significantly than you may want.

                  I'm not sure what debate in C regarding ">>" you're referring to; did you mean the overload of that operator in C++ for iostreams?

                  If so, this case is quite different because "=>" was never a legal operator in C# before. I agree that it looks somewhat similar, but mixing it up with ">=" in practice is pretty much impossible because the types of expressions are so different. You can come up with contrived cases, of course:

                  void Foo(bool b); // #1
                  void Foo(Func<int, int> x); // #2

                  int x

              • by oravecz ( 543740 )

                Out of curiosity, why? It would seem to me that this (C#):

                (x, y) => x + y

                is much preferable to this (JS):

                function(x, y) { return x + y; }

                and is syntactically sugarlicious in JS 1.8 (MDC link [mzl.la]) :

                function(x, y) x + y

                In the SSJS space, some frameworks support more recent JS specifications which include some more interesting language capabilities than lambda syntax. One of my favorites is destructuring assignment which is used often with the require() function in a way similar to Java's import statement.

                New in JavaScript 1.7 [mozilla.org]

                New in JavaScript 1.8 [mozilla.org]

                • It's better, but, so far as I know, it's a Mozilla language extension, and is not part of the EcmaScript 5e - and thus not portable.

        • If I'm reading a bunch of stuff with complex web pages (e.g. open all today's links from a news aggregator such as Fark in tabs, getting a wide mixture of badly designed web pages), eventually FF will start hogging the whole CPU and burning more RAM. Fortunately I've got a dual-core machine, so it normally only burns one core, and I can't actually tell if it's Javascript or Flash that's doing it, but I'm really much more interested in stability than speed at this point. Speed matters a bit after Firefox

        • by mutube ( 981006 )

          Not sure if you're getting the parents point (apologies if you are, I might be misunderstanding you!)

          Original speed = 10s load time
          2x as fast (100% improvment) = 5s (5 second improvement)
          2x as fast again = 2.5s
          2x as fast again = 1.25s
          2x as fast again = 0.625s (0.625 second improvement)

          So the longer it goes on the less actual improvement 100% represents - and less noticeable. I think its difficult to judge the value of these results without absolute times.

          • by JSBiff ( 87824 )

            Yes, I get that, but you're missing my point, I think.

            In math and science classes, you might talk about the relationship between frequency and period. For example, with an oscillation like an A/C electric current, or radio/light wave, period is how much time it takes to complete a single cycle, frequency is how many cycles occur in a fixed time period (usually, 1 second). Mathematically, period = 1/frequency, and vice versa.

            What I'm saying is that going from 1.25s to 0.625s, even though it doesn't sound lik

      • Lets say a page takes a ridiculous 10s to run on the old browsers, Chrome comes out and takes 5s off that number so now it's 5s. Their next update manages to shave another 2s off, that's a 40% reduction right there, even though it's less than half the improvement the previous version gave. Then they shave another 1.5s off, the new engine is twice as fast. We look at things in ratios, which is the way it should be when looking at incremental improvements, but it means that when you're talking about fractions

    • Personally I'd suggest using this period of constant innovation to do something bold like embedding a sandboxed VM of java, or python, or lisp, or anything with strong types and good exception management.

      I understand if browsers have to support javascript until the end of times, but there shouldn't be anything stopping all the browser makers from embedding a BSD'd, shared implementation of a scripting engine. Of course it going to be hard to implement but it's still several orders of magnitude easier than,

      • I'm more "pussy" about parentheses myself. Python might be nice, but I'll never use it simply because it doesn't have any. Now C++ on the other hand, that would kick ass...

        • Python supports parenthesis with custom delimiters provided you keep your code indented:

          class Dog: #{
                  def bark(self):#{
                          print "bow-wow!";
                  #}
          #}

          Of course you can stop intenting using this
          from __future__ import braces

          But C++ sounds great! Yay buffer overruns!

          • uhm no, python supports comments. that's hardly the same. oh, and it requires a # on every comment line, that's another no-no for me... you know, what happens if you want to comment out something *within* a line? as in

            if (testcondition1 /* || testcondition2 */)

            ? for the life of me I don't get why people would not re-use such, uhm, advancements in computer technology. as cumbersome as c++ may be, it can also be very sweet. not to mention fast.

            But C++ sounds great! Yay buffer overruns!

            oh come on, it's not lik

            • Congratulations, I'm not sure anymore if you're just a humorless clod or a subtle troll.

              • oh yeah, right.

                you say people should not be "pussy" and embed "anything with strong typing."

                so I mention the reason why I CAN'T like a language I'd actually like to like (python), and c++.

                then you say python "supports brackets" with its hilariously basic comment syntax... and how c++ has "buffer overflows" as intrinsic disadvantage. you know, both of those are bullshit, and now you've run out of anything to say you get to call me troll? humourless no less, which is ironic to say the least.

                well, you could al

              • and and sure, so you were joking about the brackets.. way to "discuss" tech stuff, gah. I stand by it, blehhhh to most of the languages you mentioned. yay c++.

    • by jandrese ( 485 )
      Given how godawful slow Javascript has been in the past, there is a lot of room for improvement. Google is especially interested in fast Javascript, because so many of their services are very JS heavy and the quality of the user experience is harshly affected by old slow JS interpreters.
    • by gl4ss ( 559668 )

      no.. it's just that chrome pr guys bullshitted so widely with their initial press releases about chrome.

      I'm sure everyone who had an early version of the comically hyped chrome knows what i'm talking in regards of the overhyping if they had an instance of chrome crash all the tabs at once - which was exactly opposite of what their advertising material had promised.

      it's also about choosing to use different measurements for every iterations benchmarks, say, you got a feature that you got working really well..

  • Stability (Score:3, Interesting)

    by ifiwereasculptor ( 1870574 ) on Tuesday December 07, 2010 @03:41PM (#34479140)

    I've been using Chrome for ages, but it seems to me like it's already way faster than it would have to be. I use a very dated machine and cannot usually saee Chrome being much faster than Firefox 3.5.12. They should be focusing on improving stability, because since Chrome 7 I've been experiecing unresponsive tabs, tabs that just won't load anything while others do fine and a plethora of other annoyances. Plus it can't really handle /.'s text box. I can't even go back with my mouse to correct a "saee" that's been bugging me for seconds!

    • by dingen ( 958134 )

      I've been using Chrome for ages

      Seriously? The initial release of Chrome was in September 2008, so you've been using it for just over 2 years now if you started using it right when it launched. Is that what people are calling "ages" these days, two years?

      • Obviously, since an astrological age is about 2000 years the OP has been using Chrome for at least 4000 years.

    • ifiwereasculptor: that happened to me too, once. I'm a FF4 user now... (sorry, guys!)
    • Chrome FASTER than Firefox? What the hell. For me, it's around 5-8 times slower on an average website -- little difference on Slashdot, tremendous on, say, CNN.

      This is easily explained if you cut yourself and disable AdBlock -- the speeds will be similar.

      Somehow none of lists shipped with AdBlock do something to all that 15th party tracking, you need to purge them yourself, but even in the default settings the difference is still hugely in favour of Firefox.

      This is an optimization Chrome's authors should

      • You know there is AdBlock for Chrome? Works perfectly!
        • It merely hides stuff from view rather than actually blocking it. There are attempts to make it work but as the author says, Chrome doesn't provide necessary API to do that.

          • It'll likely never do that. This is Google. If they had a choice of leaving Eric Schmidt's head up your ass or removing his head and curing cancer, they'd start building more cancer wards.

          • This was the situation about half a year ago. Since then, AdBlock for Chrome has blocked ads from being downloaded.
      • Somehow none of lists shipped with AdBlock do something to all that 15th party tracking, you need to purge them yourself,[...]

        So what is the EasyPrivacy list [adblockplus.org] then?

        It has been decided at least two years ago to put the tracking filter rules in their own
        list, because they obviously don't belong in a pure adblocking list.

        Yes, there had been complaints by people who wanted ads blocked but the
        tracking stuff left intact.

    • by D Ninja ( 825055 )

      Plus it can't really handle /.'s text box.

      Now now. Let's keep our expectations realistic.

      /take it how you want

    • by Barryke ( 772876 )

      Plus it can't really handle /.'s text box.

      I was thinking i was the only one.
      For some reason (on some W7 systems) i can't cut-paste inside the SlashDot text box when using Chrome. Thank god for the Quote Parent button though.

  • by Sparkycat ( 1703438 ) on Tuesday December 07, 2010 @03:50PM (#34479290) Homepage

    We'll all look back on this era as a golden age for browser competition and progress.

    I can't even think of an analogous situation, with four different entities with vastly different philosophies, improving their browsers at a breakneck pace, embracing(at least publicly) open standards over proprietary technology, and competing almost exclusively on the merits of their products.

  • Since Android already has Google's JS engine (in the browser), why not make it so you can write native apps in it? As in, ones that can access everything you can access from java. It might be slightly slower, but I doubt by much....especially since most of the intensive stuff (say, animations) can be done by OS. I work with both languages on the platform, and having to use java is just painful for the stuff that is so easy in javascript. Javascript may not be a perfect language, but its got so many adva
    • by AusIV ( 950840 )
      Look at phone gap [phonegap.com]. I just discovered it today, so I don't know if it's any good, but it looks like what you're talking about.
      • by catbutt ( 469582 )
        Well aware of phonegap. It works by doing everything in WebViews, which makes it slow, clunky, and unable to do a lot of things that you can do in native views. For what it's worth, I do a lot of work on WebViews with javascript in Android apps (without phonegap), but it is a hacky solution at best.
    • Well, then look into the Titanium framework. You code in JavaScript (and HTML, CSS) and it cross compiles to native apps for iOS, Android, Blackberry and desktop apps. http://www.appcelerator.com/ [appcelerator.com] I have only dabbled for a short time, but seems quite cool.
    • So, reinvent XUL? Applications made in JS with XML views, downloaded on demand with access to the system APIs. Seems to fit the bill.

  • by sl0ppy ( 454532 ) on Tuesday December 07, 2010 @04:26PM (#34479784)

    wondering how quickly these speed increments will "trickle down" to projects like node.js.

    i'd love to see speed increases as the javascript engine matures.

    • I would love to see these trickle down to a Java Embeddable engine like Rhino

      • V8 is an embeddable engine.

        IMO it is actually easier to use than Rhino.

        From C++: http://code.google.com/apis/v8/embed.html
        For .NET apps: http://javascriptdotnet.codeplex.com/
        python: http://code.google.com/p/pyv8/
        ruby: https://github.com/cowboyd/therubyracer

        ...
  • How sad I cannot use Chrome until they fix this bug: http://code.google.com/p/chromium/issues/detail?id=47416 [google.com] The most innocent applications (framesets with documentation, TOC/Search on the left, actual content on the right) do not work in Chrome if loaded from a local hard-drive (or chrome is started with some weird, undocumented switch). Those framesets worked fine even in Netscape 4 and ancient versions of KHTML.
    • You have to disable the same origin policy [wikipedia.org] with the switch --disable-web-security. Use the browser session with this switch strictly only to browse the documents on your local hard drive, or malicious websites can read your home files etc. nice stuff.

  • Now if they could just address some *real* world issues. Like large session restores (dozens of windows/tabs) or browsers that don't eat CPU time when they are idle (all windows minimized and/or inactive). There are many users who view Javascript as inherently evil and think the Web would be better off without it. Its *my* PC and should only be running open source code which many eyes have looked at (not true for a majority of Javascript loose in the wild).

    Until they get the session restore and CPU issues right the browser IS NOT GREEN. The people benchmarking browsers or reviewing browsers need to think a bit more outside of the box that seems to consist only of "How fast does Javascript run?" or "How many of the HTML 5 tests does it complete?"

    For example, "What is the minimum memory that a browser requires for a specific set of sites?", "What is the system load, e.g. processes, file handles, disk I/O's, etc., to load a specific set of sites?", "How does the browser perform when one exceeds RAM memory? (is the current Window/tab responsive?)", "What is the largest HTML document I can load and how long does it take?", "How long does it take to complete loading a complex diversified page, e.g. one which loads sub-elements from 50-100 other sites?"

    The stress and performance testing of browsers seems confined to a box whose dimensions are typically measured in angstroms!

    • by catbutt ( 469582 )

      There are many users who view Javascript as inherently evil and think the Web would be better off without it.

      How many, really? Are these the same users who think the web would be better off without any advertising? Just a guess, but those users probably don't weigh heavily in google's priorities.

      Its *my* PC and should only be running open source code which many eyes have looked at (not true for a majority of Javascript loose in the wild).

      If you apply that to sandboxed, interpreted languages....you migh

      • by bickle ( 101226 )

        How many, really?

        Well, according to the Firefox addon page, NoScript has 367,131 weekly downloads.

        • Oh ffs... yes, I'm sure all NoScript users disable all javascript on all sites all the time.

          Please.

          Hell, I have NoScript automatically whitelist all subdomains, specifically because I *want* JS to work, I just don't third-party crap to work (unless I've whitelisted it).

    • Commenting instead of moderating, and I agree - browser reviews appear to have devolved into "Browser X is best at Benchmark Y and Z, and is therefore the best browser!" when, as far as I can tell from my real-world usage, there are many more glaring deficiencies and advantages that are ritualistically ignored in a market where all browsers are rapidly approaching "good enough". For example:

      * Firefox still eats too much memory, and still slows down to a crawl once it eats >1GB (even on a machine with 16G

  • by bonch ( 38532 )

    Yes! Text will load even more imperceptibly quickly!

  • Seems, Chrome team has finally gotten to optimize for the Mozilla Kraken. The gains in other benchmarks are about 10%. Nevertheless all progress is good, may be all this optimization will trickle down to some real world speed.
    • Another way to look at this is that by adding codegen that can do some kind of type specialization that they are seeing similar benefits to Mozilla's tracing JIT. If Kraken happens to benefit most from this class of optimizations, then the observations made could simply be the result of good code on Google's part, with no subterfuge or optimizing-for-the-benchmark going on.

    • by caspy7 ( 117545 )

      Given that Mozilla's Kraken was designed to measure what they would perceive as real-world speed, then we should hope so.

  • About 6 months ago I used chromium for my default browser, but recently I have had to launch Firefox more and more. 1) Adblock is missing ALOT of ads suddenly. Especially flash ones which really kill me on linux. It doesn't help that Adblock on chrome still actually loads ads and then hides them. 2) Websites like imdb.com with a center div that is styled with a shadow bring chromium to a crawl. 3) Chrome couldn't load Google Adsense or Gmail a few times, I had to start firefox instead. I have been wat
  • load up a /. page with >1000 comments on a core-i3 machine and watch chrome stutter and sputter as you scroll at a blazing 5fps.
    load up the same page on firefox latest stable and voila! the page scrolls ultra-smooth and absolutely no lags. so i'm kinda suspicious about the usefulness of tests like sunspider.

Ocean: A body of water occupying about two-thirds of a world made for man -- who has no gills. -- Ambrose Bierce

Working...