Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Issue 9837109: Improve performance of keyed loads/stores which have a HeapNumber index. (Closed)

Created:
8 years, 8 months ago by fschneider
Modified:
8 years, 8 months ago
Reviewers:
Jakob Kummerow
CC:
v8-dev
Visibility:
Public.

Description

Improve performance of keyed loads/stores which have a HeapNumber index. Some GWT compiled code results in array access that has a heap number (e.g. -0) as an index. Until now this would result in a generic IC. For example: a[-0] === a[0] or a[0.25 * 4] === a[1] This change detects heap numbers that are representable as a smi and converts them. As a result we can still use the fast keyed monomorphic ICs. Optimized code already handles keyed access with a double-key efficiently. As a result the frame rate on the reported benchmark improves by roughly 2x. BUG=v8:1388, v8:1295, chromium:82493 Committed: https://code.google.com/p/v8/source/detail?r=11282

Patch Set 1 #

Patch Set 2 : minimize duplicate code, ia32 only #

Patch Set 3 : fixed formatting #

Total comments: 2

Patch Set 4 : port to x64 and ARM, and added support for double- and external arrays #

Patch Set 5 : fixed ia32 compilation #

Total comments: 3

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+165 lines, -46 lines) Patch
M src/arm/stub-cache-arm.cc View 1 2 3 7 chunks +51 lines, -11 lines 0 comments Download
M src/ia32/stub-cache-ia32.cc View 1 2 3 4 5 9 chunks +49 lines, -15 lines 0 comments Download
M src/ic.cc View 1 2 2 chunks +27 lines, -8 lines 0 comments Download
M src/x64/stub-cache-x64.cc View 1 2 3 7 chunks +38 lines, -12 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
fschneider
8 years, 8 months ago (2012-03-29 09:43:27 UTC) #1
fschneider
On 2012/03/29 09:43:27, fschneider wrote: This is ia32 only. If approach looks good, I'll port ...
8 years, 8 months ago (2012-03-29 09:43:52 UTC) #2
Jakob Kummerow
Looks good. You've only updated Generate{Load,Store}FastElement. What about Generate{Load,Store}{FastDoubleElement,ExternalArray}? https://chromiumcodereview.appspot.com/9837109/diff/6002/src/ia32/stub-cache-ia32.cc File src/ia32/stub-cache-ia32.cc (right): https://chromiumcodereview.appspot.com/9837109/diff/6002/src/ia32/stub-cache-ia32.cc#newcode3656 src/ia32/stub-cache-ia32.cc:3656: ...
8 years, 8 months ago (2012-03-29 11:38:45 UTC) #3
fschneider
new patchset uploaded.
8 years, 8 months ago (2012-04-11 13:38:28 UTC) #4
Jakob Kummerow
LGTM with comments. You've removed a "TODO(1295)" -- if that was on purpose, please don't ...
8 years, 8 months ago (2012-04-12 07:45:46 UTC) #5
fschneider
8 years, 8 months ago (2012-04-12 07:59:58 UTC) #6
Comments addressed. I'll mark issue 1295 as fixed since we probably do want to
keep these fast cases for converting the key in any case.

https://chromiumcodereview.appspot.com/9837109/diff/14001/src/ia32/stub-cache...
File src/ia32/stub-cache-ia32.cc (right):

https://chromiumcodereview.appspot.com/9837109/diff/14001/src/ia32/stub-cache...
src/ia32/stub-cache-ia32.cc:3332: __ JumpIfNotSmi(eax, fail);
On 2012/04/12 07:45:47, Jakob wrote:
> s/eax/key/ !

Oops. Thanks for catching. I should run tests with nosse2 as well.

Powered by Google App Engine
This is Rietveld 408576698