Bug 15958 - base64 spends 1.1% of total time checking for special Infinity case
Summary: base64 spends 1.1% of total time checking for special Infinity case
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-12 12:53 PST by Eric Seidel (no email)
Modified: 2007-11-13 00:05 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.39 KB, patch)
2007-11-12 23:14 PST, Geoffrey Garen
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.