Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #17983
| From | Gregor Kofler <usenet@gregorkofler.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Mysterious slowdown in Chromium |
| Date | 2013-01-06 16:25 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <kcc528$3m3$1@dont-email.me> (permalink) |
| References | <kcc0nh$ckn$1@news.albasani.net> |
Am 2013-01-06 15:12, Stefan Weiss meinte:
> I was doing a quick benchmark in Chromium, when I noticed that
> subsequent runs were getting slower and slower. Reduced to the minimal
> case, the effect can be reproduced with this:
>
> <!DOCTYPE html>
> <html>
> <head>
> <title>Test</title>
> </head>
> <body>
> <script>
> function bench() {
> function test() {}
> var runs = 10000000, // adjust as needed
> t0 = +new Date();
> while (runs--) test();
> console.log((+new Date() - t0) + "ms");
> }
> </script>
> <button onclick="bench()">bench()</button>
> </body>
> </html>
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.
Duplicating your test case I get
13ms
48ms
53ms
50ms
48ms
48ms
51ms
49ms
52ms
54ms
53ms
93ms
84ms
90ms
84ms
88ms
..
95ms (or less)
HTH, Gregor
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