New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 690 link

Starred by 16 users

Issue metadata

Status: Assigned
Owner:
User never visited
HW: ----
NextAction: ----
OS: ----
Priority: 2
Type: Bug



Sign in to add a comment

Splay benchmark spends too much time converting numbers to strings

Reported by kasperl@chromium.org, Apr 30 2010

Issue description

As noted in https://bugzilla.mozilla.org/show_bug.cgi?id=562553, the Splay benchmark 
unintentionally spends too much time converting numbers to strings. The bug report contains two 
possible fixes to this issue - but it seems the only way that doesn't dramatically change the working 
set of the running benchmark is the first one: Convert the key to string before passing it to 
GeneratePayload.


 
Please don't just do the first fix.  You're worried about changing the working set of
the benchmark, but avoiding all those double-to-string conversions is already
drastically changing the benchmark, so why not fix it properly while you're at it? 
No competent programmer would write code that does all those repeated string
concatenations.

Even with the full fix in place, building a sub-tree with 32 identical leaf nodes is
pretty weird and synthetic.  It would be nice if it did something more realistic, but
maybe that's asking too much.
From one of the other bug reports, it sounds like you're running the version that is within SunSpider 
(http://svn.webkit.org/repository/webkit/trunk/SunSpider/tests/v8-v4), so I thought it might be in order to 
point out that the Setup and TearDown functions are not counted towards the benchmark score when running 
the V8 benchmark suite (see the implementation in base.js). The time it takes to build the working set 
shouldn't have any impact on the final score, so the unintentional number-to-string conversions may be 
(slightly) less of a problem when running the official V8 benchmark suite.

I'll keep this issue accepted and work on a suitable fix anyway.


Status: Assigned
Avoided repeated number-to-string conversion of the same number in bleeding_edge r4658.
Labels: Priority-2

Comment 5 Deleted

Sign in to add a comment