Bug 63864 - SunSpider: string-validate-input doesn't do anything with its results
Summary: SunSpider: string-validate-input doesn't do anything with its results
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-02 13:05 PDT by Maciej Stachowiak
Modified: 2011-07-02 13:05 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Stachowiak 2011-07-02 13:05:39 PDT
In bug 38886, Nicholas Nethercote wrote:

I noticed recently that string-validate-input.js also has this property.  Because that benchmark is dominated by string concatenation, a JS engine can over-optimize this benchmark by applying a lazy concatenation approach -- ie. build a tree of to-be-concatenated strings and then concatenate them when needed.  Except in this string-validate-input.js the final string is never used so the actual final concatenation step is not needed.

The final string should be used.  Printing the whole thing out is a bad idea, it's 420,000 chars and so I/O costs would dominate.  Maybe printing out every 1000th char would be ok?  That provide a reasonable amount of "use" of the final string so that over-optimizing the benchmark would be difficult.  Or computing a really simple hash of the string would be a more thorough use.  bitops-bitwise-and.js provides an example of a really simple hash that could be used -- just '&' together every char.