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 [parser] Use n-ary addition for template strings 2017-10-31 16:02:53 +00:00
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 [test] Ensure random generator in JSTests does not use float arithmetic 2018-12-17 10:05:08 +00:00
JSTests1.json [js-perf-test] Benchmark for sloppy equality 2020-05-04 08:29:00 +00:00
JSTests2.json [benchmarks] Move Array slice benchmarks to js-perf-test 2019-05-20 09:05:52 +00:00
JSTests3.json [perf-test] Add a performance test for LdaGlobal bytecodes 2019-10-09 16:34:33 +00:00
JSTests4.json add micro-benchmark for proxy trap setPrototypeOf 2019-06-25 16:18:52 +00:00
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 Add benchmark for regexp "gi". 2019-06-28 17:56:31 +00:00
SixSpeed.json Increase timeout for JSTests/Array test and fix Michael's username 2019-04-16 12:24:10 +00:00
SuperIC.json [super] Rewrite perf tests 2020-11-16 08:36:24 +00:00