Bug 15958

Summary: base64 spends 1.1% of total time checking for special Infinity case
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: JavaScriptCoreAssignee: Geoffrey Garen <ggaren>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, ggaren
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Patch sam: review+

Description Eric Seidel (no email) 2007-11-12 12:53:03 PST
base64 spends 1.1% of total time working around toDouble/kjs_dota logic mismatch

Well, here's another softball:

at least 1.4% of *total time* in base64 is spent on this line in UString::toDouble:

if (strncmp(c, "Infinity", 8) == 0) {

We already have our own custom dota (aka kjs_dota) we just need a way to call into that logic where it doesn't ever return "Infinity" and instead does what UString::toDouble wants it to.
Comment 1 Geoffrey Garen 2007-11-12 22:25:04 PST
I'll take this.
Comment 2 Geoffrey Garen 2007-11-12 23:14:42 PST
Created attachment 17221 [details]
Patch
Comment 3 Sam Weinig 2007-11-12 23:48:12 PST
Comment on attachment 17221 [details]
Patch

Looking reasonable.  r=me.
Comment 4 Eric Seidel (no email) 2007-11-12 23:48:50 PST
Comment on attachment 17221 [details]
Patch

Oh.  I figured we'd had up kjs_dota, but this looks great too. :)
Comment 5 Geoffrey Garen 2007-11-13 00:05:19 PST
Committed revision 27748.