6230641b83
This patch introduces a new inline runtime function, %_HasFastPackedElements(), and uses it both in the implementation of the 'in' operator and in the array builtins to speed up testing for the existence of an index in an array. In testing with the microbenchmark on the attached bug, for example, the runtime goes from 326ms to 66ms. A reviewer might ask whether the HAS_INDEX macro is worthwhile, and I tried the same example without it, which pushed the microbenchmark up to 157ms. So it seems it's worth it to avoid the function call to IN() if we know we're dealing with arrays and numbers. BUG=v8:3701 LOG=n Review URL: https://codereview.chromium.org/754863002 Cr-Commit-Position: refs/heads/master@{#25665} |
||
---|---|---|
benchmarks | ||
build | ||
include | ||
samples | ||
src | ||
test | ||
testing | ||
tools | ||
.clang-format | ||
.gitignore | ||
AUTHORS | ||
BUILD.gn | ||
ChangeLog | ||
codereview.settings | ||
DEPS | ||
LICENSE | ||
LICENSE.strongtalk | ||
LICENSE.v8 | ||
LICENSE.valgrind | ||
Makefile | ||
Makefile.android | ||
Makefile.nacl | ||
OWNERS | ||
PRESUBMIT.py | ||
README.md | ||
WATCHLISTS |
V8 JavaScript Engine
V8 is Google's open source JavaScript engine.
V8 implements ECMAScript as specified in ECMA-262.
V8 is written in C++ and is used in Google Chrome, the open source browser from Google.
V8 can run standalone, or can be embedded into any C++ application.
V8 Project page: https://code.google.com/p/v8/
Getting the Code
V8 Git repository: https://chromium.googlesource.com/v8/v8.git GitHub mirror: https://github.com/v8/v8-git-mirror
For fetching all branches, add the following into your remote
configuration in .git/config
:
fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*
fetch = +refs/tags/*:refs/tags/*