Bug 20844 - Speed up parseInt for numbers
Summary: Speed up parseInt for numbers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-14 16:40 PDT by Sam Weinig
Modified: 2008-09-14 18:10 PDT (History)
0 users

See Also:


Attachments
patch (1.55 KB, patch)
2008-09-14 16:41 PDT, Sam Weinig
zwarich: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2008-09-14 16:40:04 PDT
If the global function parseInt is used to convert a double to an int (as it seems is done in the function(p,a,c,k,e,d) code packer), it is inefficient to convert the value to a string and then back to an integer.
Comment 1 Sam Weinig 2008-09-14 16:41:50 PDT
Created attachment 23425 [details]
patch
Comment 2 Cameron Zwarich (cpst) 2008-09-14 16:44:07 PDT
Comment on attachment 23425 [details]
patch

r=me
Comment 3 Sam Weinig 2008-09-14 18:10:38 PDT
Fixed in r36410.