[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:02:17 PDT 2016


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

--- Comment #7 from Oliver Hunt <oliver at apple.com> ---
If i make the function take 0 parameters and use arguments object there's no perf delta either:
function f() { var j = arguments[0]; for (var i = 0 ; i < 500000000; 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(); var end = new Date; print("2nd: " + (end - start) + "ms");
1st: 3915ms
2nd: 4081ms

This behaviour is only occurring if i pass zero parameters in the first call to the function.

-- 
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/66f2a88a/attachment.html>


More information about the webkit-unassigned mailing list