[Webkit-unassigned] [Bug 155551] Pathological performance on first execution of a function called with mismatched argument count

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 16 13:11:32 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=155551

--- Comment #11 from Oliver Hunt <oliver at apple.com> ---
(In reply to comment #10)
> (In reply to comment #8)
> > 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.


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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160316/f1941d39/attachment.html>


More information about the webkit-unassigned mailing list