Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Gregor Kofler Newsgroups: comp.lang.javascript Subject: Re: Mysterious slowdown in Chromium Date: Sun, 06 Jan 2013 16:25:59 +0100 Organization: A noiseless patient Spider Lines: 60 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 6 Jan 2013 15:26:00 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="8704bf164e793a947cd84ce3d228347f"; logging-data="3779"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19y9S3zohlud1Cz8D5ku6Ph0TmSBXj7rZQ=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: Cancel-Lock: sha1:CDG9tg5M7/iKZNzS0dSQBJ7PojQ= Xref: csiph.com comp.lang.javascript:17983 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: > > > > > Test > > > > > > 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