Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #17990
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!aioe.org!.POSTED!not-for-mail |
|---|---|
| From | Cezary Tomczyk <cezary.tomczyk@gmail.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Mysterious slowdown in Chromium |
| Date | Sun, 06 Jan 2013 23:44:27 +0100 |
| Organization | Aioe.org NNTP Server |
| Lines | 58 |
| 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> |
| NNTP-Posting-Host | RMrsF+s1qSnxq5Qkkqjnpw.user.speranza.aioe.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Complaints-To | abuse@aioe.org |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
| X-Notice | Filtered by postfilter v. 0.8.2 |
| Xref | csiph.com comp.lang.javascript:17990 |
Show key headers only | 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
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