<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#c11">Comment # 11</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>(In reply to <a href="show_bug.cgi?id=155551#c10">comment #10</a>)
<span class="quote">> (In reply to <a href="show_bug.cgi?id=155551#c8">comment #8</a>)
> > Sorry, I still don't see anything actionable here.
>
> Really? If i have a function f(i), and then do f();f(); it's reasonable for
> the first call to f to take vastly longer than the second? but if i do
> f(undefined);f(undefined); that won't happen.</span >
I mean seriously, it seems unreasonable to get this behaviour:
function f(j) { for (var i = 0 ; i < 50000000; i++) j = (j ? j * i : 1) ^ (i & j); }; var start = new Date; f(); var end = new Date; print("1st: " + (end - start) + "ms");var start = new Date; f(); var end = new Date; print("2nd: " + (end - start) + "ms")
1st: 1793ms
2nd: 487ms
vs. this behaviour:
function f(j) { for (var i = 0 ; i < 50000000; i++) j = (j ? j * i : 1) ^ (i & j); }; var start = new Date; f(undefined); var end = new Date; print("1st: " + (end - start) + "ms");var start = new Date; f(undefined); var end = new Date; print("2nd: " + (end - start) + "ms")
1st: 439ms
2nd: 417ms</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>