v8/test/js-perf-test
Mihir Shah 9711289d06 A jump-table implementation for constant case switch statements
The change is made since for switch statements with lots of cases,
where each case is a constant integer, the emitted bytecode is still
a series of jumps, when we can instead use a jump table.

If there are 6 or more cases (similar to GCC) of Smi literals, and
if the max Smi case minus the min Smi case is not more than 3 times
the number of cases, we use a jump table up front to handle Smi's,
and then use traditional if-else logic for the rest of the cases.

We then use the jump table in interpreter/bytecode-jump-table to
do the optimization.

This tries to go off issue 9738 in v8's issue tracker. It is not
exactly the same, since that recommends doing the work at JIT-time,
but has similar ideas. It also partially goes off issue 10764.

Bug: v8:9738
Change-Id: Ic805682ee3abf9ce464bb733b427fa0c83a6e10c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2904926
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75323}
2021-06-23 09:26:23 +00:00
..
Array [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayIndexOfIncludesPolymorphic [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayInOperator [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayLiteralInitialSpreadLargeDoubleHoley [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayLiteralInitialSpreadLargeDoublePacked [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayLiteralInitialSpreadLargeHoley [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayLiteralInitialSpreadLargePacked [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayLiteralInitialSpreadLargeSmiMap [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayLiteralInitialSpreadLargeSmiSet [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayLiteralInitialSpreadSmallDoubleHoley [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayLiteralInitialSpreadSmallDoublePacked [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayLiteralInitialSpreadSmallHoley [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayLiteralInitialSpreadSmallPacked [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayLiteralInitialSpreadSmallSmiMap [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayLiteralInitialSpreadSmallSmiSet [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArrayLiteralSpread [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ArraySort [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
AsyncAwait [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
BigInt [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
BytecodeHandlers [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Classes [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Closures [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Collections [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
DataView [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Dates [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Exceptions [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ExpressionDepth
ForLoops [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Generators [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
IC [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Inspector [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
InterpreterEntryTrampoline [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Intl [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Iterators [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Keys [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ManyClosures [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Modules [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Numbers [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Object [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ObjectFreeze [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
ObjectLiteralSpread [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Operators [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Parsing [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
PropertyQueries [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Proxies [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
RegExp [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
RestParameters [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Scope [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
SixSpeed [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
SpreadCalls [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
SpreadCallsGeneral [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
StackTrace [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
StringIterators [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
Strings [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
SuperIC [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
SwitchStatements A jump-table implementation for constant case switch statements 2021-06-23 09:26:23 +00:00
Templates [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
TurboFan [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
TypedArrays [d8][mjsunit][tools] Improve d8 file API 2021-06-01 13:37:57 +00:00
base.js
JSTests1.json
JSTests2.json
JSTests3.json
JSTests4.json
JSTests5.json Add micro-benchmark for toString(16) 2020-07-30 07:15:32 +00:00
OWNERS Update OWNERS in test/* 2021-02-25 14:26:24 +00:00
RegExp.json
SixSpeed.json
SuperIC.json [super] Rewrite perf tests 2020-11-16 08:36:24 +00:00