Go to file
adamk 6230641b83 Optimize testing for an index's existence in packed Arrays
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}
2014-12-04 18:46:46 +00:00
benchmarks Revert "Refactoring: Make gtest testsuite the default." 2014-09-02 09:17:26 +00:00
build Android ARM: enable PIE. 2014-12-01 14:06:28 +00:00
include Add GetIdentityHash to v8::Name object API 2014-12-02 09:13:30 +00:00
samples Add interceptor support for symbols 2014-11-27 10:21:39 +00:00
src Optimize testing for an index's existence in packed Arrays 2014-12-04 18:46:46 +00:00
test ES6 template literals: Fix issue with template after rbrace 2014-12-04 14:50:17 +00:00
testing Remove v8stdint.h, it doesn't serve a purpose anymore. 2014-10-21 08:25:14 +00:00
tools Make JSTests ready for Android measurements. 2014-12-04 10:37:42 +00:00
.clang-format Change clang-format config to allow for two empty lines between functions 2013-12-03 10:39:21 +00:00
.gitignore Add support for downloading clang 2014-11-27 10:29:51 +00:00
AUTHORS Improve String.repeat. 2014-10-17 10:01:38 +00:00
BUILD.gn Restrict floating control to minimal control-connected component. 2014-12-02 15:56:30 +00:00
ChangeLog Upgrade version and change log after branch. 2014-11-10 10:41:13 +00:00
codereview.settings Make codereview.settings ready for git. 2014-11-12 17:40:32 +00:00
DEPS Add support for downloading clang 2014-11-27 10:29:51 +00:00
LICENSE Update LICENSE date. 2014-02-18 10:50:22 +00:00
LICENSE.strongtalk Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.v8 Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
LICENSE.valgrind Add LICENSE.v8, LICENSE.strongtalk and LICENSE.valgrind to the v8 2011-02-03 07:10:06 +00:00
Makefile Switch 'make builddeps' to use HTTPS everywhere. 2014-11-12 10:12:16 +00:00
Makefile.android Improved Makefile.android's readability a bit. 2014-12-01 14:30:37 +00:00
Makefile.nacl Use the pnacl-clang toolchain for (P)NaCL builds 2014-10-06 08:10:50 +00:00
OWNERS Revoke my own OWNERS bit. 2014-10-28 23:47:39 +00:00
PRESUBMIT.py Update default trybots. 2014-11-19 13:00:16 +00:00
README.md Add README.md file 2014-10-20 11:37:06 +00:00
WATCHLISTS Add myself to a watchlist for the public API. 2013-10-10 11:37:48 +00:00

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/*