Commit 4e2101d9 authored by sandholm@chromium.org's avatar sandholm@chromium.org

Expand fast case of parseInt to include radix == 10 and radix == 0.

Review URL: http://codereview.chromium.org/6532087

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6879 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 14e185b3
......@@ -92,7 +92,7 @@ function GlobalIsFinite(number) {
// ECMA-262 - 15.1.2.2
function GlobalParseInt(string, radix) {
if (IS_UNDEFINED(radix)) {
if (IS_UNDEFINED(radix) || radix === 10 || radix === 0) {
// Some people use parseInt instead of Math.floor. This
// optimization makes parseInt on a Smi 12 times faster (60ns
// vs 800ns). The following optimization makes parseInt on a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment