Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #17990

Re: Mysterious slowdown in Chromium

From Cezary Tomczyk <cezary.tomczyk@gmail.com>
Newsgroups comp.lang.javascript
Subject Re: Mysterious slowdown in Chromium
Date 2013-01-06 23:44 +0100
Organization Aioe.org NNTP Server
Message-ID <kccuo8$vbi$1@speranza.aioe.org> (permalink)
References <kcc0nh$ckn$1@news.albasani.net> <kcc528$3m3$1@dont-email.me> <kcc90f$tro$1@news.albasani.net>

Show all headers | View raw


W dniu 2013-01-06 17:33, Stefan Weiss pisze:
> On 2013-01-06 16:25, Gregor Kofler wrote:
>> Checked this on Chromium 22 (Ubuntu AMD64) in the web developer console
>>
>> (function bench() {
>>     function test() {}
>>     var runs = 10000000,  // adjust as needed
>>     t0 = +new Date();
>>     while (runs--) test();
>>     console.log((+new Date() - t0) + "ms");
>> })();
>>
>> Execution time stays constant with 90ms to 95ms.
[...]

Interesting results:

function bench() {
    function test() {};
    var runs = 10000000,  // adjust as needed
    t0 = +new Date();
    while (runs--) test();
    console.log((+new Date() - t0) + "ms");
};
bench();

15ms

var bench = function () {
    var test = function () {};
    var runs = 10000000,  // adjust as needed
    t0 = +new Date();
    while (runs--) test();
    console.log((+new Date() - t0) + "ms");
};
bench();

136ms

function test() {};
function bench() {
    var runs = 10000000,  // adjust as needed
    t0 = +new Date();
    while (runs--) test();
    console.log((+new Date() - t0) + "ms");
};
bench();

31ms

Tested on Google Chrome 23.0.1271.97, Windows 7 64bit.

Firefox 17.0.1 and Opera 12.12 was very slow in all above examples. More 
or less ~ 3 to ~ 13 seconds, while IE9 ~ 440 ms.

-- 
Cezary Tomczyk
http://www.ctomczyk.pl/

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Mysterious slowdown in Chromium Stefan Weiss <krewecherl@gmail.com> - 2013-01-06 15:12 +0100
  Re: Mysterious slowdown in Chromium GGolf <invalid@invalid.com> - 2013-01-06 20:22 +0530
  Re: Mysterious slowdown in Chromium Gregor Kofler <usenet@gregorkofler.com> - 2013-01-06 16:25 +0100
    Re: Mysterious slowdown in Chromium Stefan Weiss <krewecherl@gmail.com> - 2013-01-06 17:33 +0100
      Re: Mysterious slowdown in Chromium Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2013-01-06 23:44 +0100
  Re: Mysterious slowdown in Chromium Scott Sauyet <scott.sauyet@gmail.com> - 2013-01-06 08:19 -0800
  Re: Mysterious slowdown in Chromium Patricia Shanahan <pats@acm.org> - 2013-01-06 08:32 -0800

csiph-web