[Webkit-unassigned] [Bug 155551] New: 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 11:37:14 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=155551
Bug ID: 155551
Summary: Pathological performance on first execution of a
function called with mismatched argument count
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Keywords: NeedsRadar
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: oliver at apple.com
CC: fpizlo at apple.com, mark.lam at apple.com,
msaboff at apple.com, sbarati at apple.com
So, i have a case of strange performance if i donât pass an argument
function f(j) { for (var i = 0 ; i < 10000000; 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: 245ms
2nd: 223ms
If we do it again, without passing a parameter we get:
function f(j) { for (var i = 0 ; i < 10000000; 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: 11919ms
2nd: 29ms
I tried a couple of permutations, and in general it appears the first run through without passing a parameter never tiers up.
--
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/a474a267/attachment.html>
More information about the webkit-unassigned
mailing list