<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Pathological performance on first execution of a function called with mismatched argument count"
href="https://bugs.webkit.org/show_bug.cgi?id=155551#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Pathological performance on first execution of a function called with mismatched argument count"
href="https://bugs.webkit.org/show_bug.cgi?id=155551">bug 155551</a>
from <span class="vcard"><a class="email" href="mailto:oliver@apple.com" title="Oliver Hunt <oliver@apple.com>"> <span class="fn">Oliver Hunt</span></a>
</span></b>
<pre>Actually, i managing to trigger a bunch of performance cliffs. if we change f(j) to f(j,k) performance falls off a cliff:
function f(j) { for (var i = 0 ; i < 50000000; i++) j = (j ? j * i : 1) ^ (i & j); }; var start = new Date; f(1); var end = new Date; print("1st: " + (end - start) + "ms");var start = new Date; f(1); var end = new Date; print("2nd: " + (end - start) + "ms")
1st: 375ms
vs.
function f(j,k) { for (var i = 0 ; i < 50000000; i++) j = (j ? j * i : 1) ^ (i & j); }; var start = new Date; f(1); var end = new Date; print("1st: " + (end - start) + "ms");
1st: 1885ms
There is clearly some kind of perf cliff going on. At least for the first call specifically, and varying arty mismatches in general.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>