[Webkit-unassigned] [Bug 65325] Performance tweak to parseInt

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 28 16:21:56 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=65325





--- Comment #3 from Gavin Barraclough <barraclough at apple.com>  2011-07-28 16:21:56 PST ---
> Shouldn’t it be <= INT_MAX rather than < INT_MAX?
> Should we be using a constant instead of INT_MAX?

This should probably be < (INT_MAX + 1), will fix this & use a constant.

> Could we use unsigned instead of int to cover a slightly larger range?

Unsigned doesn't buy us much coverage, and makes the jsNumber conversion slightly more expensive (we'll have to check we're in the int32 range & potentially generate a boxed double), so I probably won't do this.  I'd go to int64_t if this bought us the whole 10^21 range, but sadly not.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list