Bug 16580

Summary: StringProtoFuncReplace::callAsFunction should use vectors for a speedup
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ggaren
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
fix, sunspider is crazy none

Eric Seidel (no email)
Reported 2007-12-23 00:59:02 PST
StringProtoFuncReplace::callAsFunction should use vectors for a speedup static JSValue *replace(ExecState *exec, StringImp* sourceVal, JSValue *pattern, JSValue *replacement) Does all its array manipulation by hand. It should use Vector<UString::Range> and Vector<UString> instead (if for no other reason than for the fast copies on expansion). This is what one might call an "easy fix". :)
Attachments
fix, sunspider is crazy (4.16 KB, patch)
2007-12-23 01:16 PST, Eric Seidel (no email)
no flags
Eric Seidel (no email)
Comment 1 2007-12-23 00:59:36 PST
KJS::replace is 1.4% of the sample for: run-sunspider --shark20 --tests "cube|tagcloud|unpack|spectra"
Eric Seidel (no email)
Comment 2 2007-12-23 01:16:55 PST
Created attachment 18070 [details] fix, sunspider is crazy I must have angered the sunspider gods again. SS claims this is a regression on a bunch of unrelated tests.
Alexey Proskuryakov
Comment 3 2010-06-11 16:55:50 PDT
Looks like this function uses vectors now.
Note You need to log in before you can comment on or make changes to this bug.