Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Firefox Google Mozilla Open Source Software News

Firefox 4's JavaScript Now Faster Than Chrome's 352

An anonymous reader writes "Firefox 4's JavaScript engine is now faster than V8 (used in Chrome) and Nitro (used in Safari) in the SunSpider benchmark on x86. On Mozilla's test system Nitro completes the benchmark in 369.7 milliseconds, V8 in 356.5 milliseconds, and Firefox 4's TraceMonkey and JaegerMonkey combination in 350.3 milliseconds. Conceivably Tech has a brief rundown of some benchmark figures from their test system obtained with the latest JS preview build of Firefox 4: 'Our AMD Phenom X6-based Dell XPS 7100 PC completed the Sunspider test with the latest Firefox JS (4.0 b8-pre) build in 478.6 ms this morning, while Chrome 8.0.560.0 clocked in at 589.8 ms.' On x86-64 Nitro still has the lead over V8 and TraceMonkey+JaegerMonkey in the SunSpider benchmark."
This discussion has been archived. No new comments can be posted.

Firefox 4's JavaScript Now Faster Than Chrome's

Comments Filter:
  • by crow_t_robot ( 528562 ) on Sunday October 24, 2010 @09:00AM (#34003334)
    ...is NoScript. They have brought my Java script load times down to 0.00 seconds. Thanks, NoScript.
  • by Anonymous Coward on Sunday October 24, 2010 @09:11AM (#34003400)

    I've been trying the alphas and betas, but they still haven't managed to fix the numerous memory leaks that have plagued Firefox for so long now.

    It's no longer worth opening bug reports, since the community just doesn't want to admit there's a problem in the first place. They'll blame the memory leaks on third-party extensions or plugins, even when these memory leaks arise using a pristine installation without either. Or they'll say it's just a problem with the user's system, even when it happens under many different versions of Linux, Windows and Mac OS X, running on all sorts of hardware, under many different configurations. Clearly, it's a problem with Firefox itself.

    Somehow, all of the other browser developers manage to put out browsers that don't leak huge amounts of memory after relatively short browsing sessions. Opera, Chrome, Safari, and even recent releases of IE don't go consuming gigabytes of memory, even after leaving them open for months at a time. Firefox will exceed that in less than an hour.

  • by falc ( 689160 ) on Sunday October 24, 2010 @09:38AM (#34003522)
    from http://arewefastyet.com/faq.html [arewefastyet.com]:

    "3. Why isn't Opera/IE/something here?
    Right now, the performance tests are run on a Mac, which means no IE. Also the tests rely on a "shell" JS engine that runs in a command line. It doesn't test browsers. We'll change that, eventually."
  • Interesting? (Score:4, Informative)

    by mseeger ( 40923 ) on Sunday October 24, 2010 @09:38AM (#34003526)

    I really don't see the point in a posting like this. Its all

            My _______ (1) is _______ (2) than yours

    with typical choices for (1):

    - car
    - wife / husband / significant other
    - d*ck
    - browser
    - javascript
    - OS

    and choices for (2) like:

    - faster
    - harder
    - more expensive
    - longer
    - more open
    - prettier

    Now that we have covered all these discussions, can we move on please?

    CU, Martin

  • It's not a memory leak problem. This is pretty obvious when, after weeks of continuous use, Firefox's memory usage remains more or less constant.

    However, Firefox does have a memory fragmentation problem. After continuous use, the program will become noticeably slower on certain tasks which it previously had no issues with. This is particularly the case if you're visiting more intensive webpages. Often you're better just restarting it after the first 100 or so tabs.

  • by Anonymous Coward on Sunday October 24, 2010 @10:04AM (#34003674)
    As I've said, I've tried this. Firefox's memory use tops 200 MB after two weeks. Other browsers go over 200 MB in a few days. I'm not attacking you, just stating for the record that I cannot see a problem. Perhaps on your computer that problem exists. Do not assume that every other Firefox user in the world sees the same problem. I do not. If you don't believe me, look at any number of memory tests that show Firefox using less memory than other browsers: 1 [dotnetperls.com] 2 [lockergnome.com] 3 [lifehacker.com] 4 [tomshardware.com], and many more!
  • by TheRaven64 ( 641858 ) on Sunday October 24, 2010 @10:50AM (#34003902) Journal

    Note the times for this article, however. The benchmarks that they are running are taking less than half a second from loading the JavaScript code to finishing running. That's a fairly good test for typical web pages, but it's a pretty pointless benchmark. Any script that does that little will run at an adequate speed with a fairly naive bytecode interpreter.

    The things that really benefit from JavaScript speed are long-running scripts. Consider something like a Flash game that runs for minutes at a time. When I compile programs, the compiler typically spends a second or so of CPU time running optimisations. This can easily save several seconds of CPU time over the total run time of the program, but would be pointless for a short-lived web script. This trade changes when the scripts are running for a long time.

    Modern JavaScript implementations do dynamic optimisation based on run time profiling. This is what the trace stuff was all about. Trace-based optimisations work by finding a set of basic blocks that run in a particular order - irrespective of where they are in the source code - and creating an optimised sequence (without any branches except to leave the trace), so the common-case execution of a sequence of functions / methods does not involve any jumps. Benchmarks that complete in well under a second won't give this kind of stuff any time to kick in.

    JavaScript implementations need to be optimised for two things: fast start up (very noticeable to the user) and CPU usage for longer-running scripts. These benchmarks are only really testing the former, while things like the canvas tag and WebGL are making the latter more important.

  • by ttsiod ( 881575 ) on Sunday October 24, 2010 @11:51AM (#34004404) Homepage
    I, too, saw the speed of Firefox 4 in a pretty simple, math-only benchmark that rotated a 3D object [semantix.gr]. Run it for yourself and/or see the gathered statistics (bottom of the page). Here is the Reddit discussion where many people run it and confirmed Firefox 4 supremacy [reddit.com].
  • by hedwards ( 940851 ) on Sunday October 24, 2010 @12:15PM (#34004532)
    They're working on it. It's just a matter of wanting to do it correctly rather than just doing it to say they've done it. Sort of like how they've resisted cheating on the Acid tests like some of the other browsers have been.

    Just about any moron can make a new browser window per tab and not have them talking to each other. But it takes a fair amount of work to get them connected enough for performance reasons without causing one tab to crash others.
  • Your operating system should be dealing with that, not the browser.

  • by multipartmixed ( 163409 ) on Sunday October 24, 2010 @01:24PM (#34004972) Homepage

    I hate the new comments system, too.

    Even thought the boxes stay checked I have had to go to my user preferences and turn on and then back off the new comment system several times in the last two weeks.

    Shit, I thought that I was the only person that happened to. I even had to log out/in to get the preference change to "stick".

  • Re:FF4 (Score:2, Informative)

    by Darren Winsper ( 136155 ) on Sunday October 24, 2010 @02:08PM (#34005250)

    PhD or not, you're still an idiot.

  • by colinrichardday ( 768814 ) <colin.day.6@hotmail.com> on Sunday October 24, 2010 @03:39PM (#34005818)

    Today, a decade and a half later, we have cell phones that are many hundreds of times faster than those Pentium and Pentium II systems,

    A hundred times faster than a 233 MHz processor? That's 23 GHz. What phone has a 23 GHz processor?

  • by BZ ( 40346 ) on Monday October 25, 2010 @02:01AM (#34009118)

    There are several things wrong here:

    1) Spidermonkey still compiles the AST to bytecode.
    2) An assembler does just that: assembles. This means a 1-1 mapping of some other sort of
            representation of the exact machine instructions you want into actual bits in memory.
            There are no smarts here and no optimization going on; the only question is how fast
            you generate those bits in memory; an ideal assembler does this as fast as possible
            and without using too much memory. Now you have to generate assembly (or whatever
            representation the assembler takes as input) for it to assemble. That's the job of
            the compiler. JaegerMonkey takes the bytecode generated in step 1 and compiles it,
            passing the output to the assembler borrowed from Nitro. This compilation step is
            where (some of) the optimization takes place, and this is not code shared with Nitro.
    3) Tracemonkey is most certainly useful for Sunspider; just not as useful as for other
            things. See, for example, http://arewefastyet.com/?machine=6 [arewefastyet.com] where the purple line is
            below the black one solely because of Tracemonkey. Alernately, see
            https://bug580468.bugzilla.mozilla.org/attachment.cgi?id=482609 [mozilla.org] where you can see the
            scores on each sunspider subtest as of a week or so ago; the -m column is JaegerMonkey
            without Tracemonkey, -j is Tracemonkey without Jaegermonkey, and -mjp is what's
            actually being used now (a combination of the two, with some smarts about deciding
            when to use which one).
    4) The goal of Kraken is in fact to include anticipated use cases. If you know
            anticipated use cases it doesn't include, I'm sure Rob Sayre would love to know what
            they are.

For God's sake, stop researching for a while and begin to think!

Working...