dart-sdk/benchmarks
Stephen Adams 6ca7571e2b [benchmark] Benchmark for switch on various constant types
AOT:
SwitchFSM.enum(RunTime): 29.549523327947906 us.
SwitchFSM.int(RunTime): 37.73789702628717 us.
SwitchFSM.class(RunTime): 138.6418530572675 us.
SwitchFSM.string(RunTime): 797.54075 us.

dart2js+V8:
SwitchFSM.enum(RunTime): 31.484299349840917 us.
SwitchFSM.int(RunTime): 26.022895908416366 us.
SwitchFSM.class(RunTime): 91.67433302667894 us.
SwitchFSM.string(RunTime): 92.31338451577098 us.

Both AOT and dart2js are 'good at' switches on enum values.

When compiled with --enable-experiment=records,patterns:

AOT:
SwitchFSM.enum(RunTime): 141.75470079359405 us.
SwitchFSM.int(RunTime): 145.25322604030737 us.
SwitchFSM.class(RunTime): 138.45460840662005 us.
SwitchFSM.string(RunTime): 797.226 us.

dart2js+V8:
SwitchFSM.enum(RunTime): 98.93787283573403 us.
SwitchFSM.int(RunTime): 29.459852700736498 us.
SwitchFSM.class(RunTime): 98.62184338405162 us.
SwitchFSM.string(RunTime): 92.035889371936 us.

There is work to be done to recover the performance.

Change-Id: I1197129cb32615a06a63a05d7ba300b46c68b4d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287246
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2023-03-10 04:21:13 +00:00
..
AsyncLiveVars
BigIntParsePrint Spelling sdk 2023-01-20 12:37:49 +00:00
Calls
DartCLIStartup
Dynamic
EventLoopLatencyJson
EventLoopLatencyJson350KB
EventLoopLatencyRegexp
Example Spelling benchmarks 2022-12-20 12:36:37 +00:00
FfiAsTypedList
FfiBoringssl
FfiCall [benchmarks/ffi] Add @Native calls to FfiCall benchmark 2023-03-02 15:23:16 +00:00
FfiMemory Spelling benchmarks 2022-12-20 12:36:37 +00:00
FfiStruct
FfiStructCopy [benchmarks/ffi] Add FfiStructCopy benchmark 2022-12-29 10:21:19 +00:00
FileIOSink/dart Await the benchmark reports 2023-03-08 22:38:21 +00:00
InstantiateTypeArgs [benchmarks] Address post-review comments for InstantiateTypeArgs. 2022-07-27 08:54:57 +00:00
IntegerSetLookup [gardening] Fix copyright statement typo. 2022-09-15 18:00:59 +00:00
Isolate
IsolateBaseOverhead
IsolateFibonacci
IsolateJson
IsolateRegExp/dart [benchmarks] Add IsolateRegExp benchmark for regexp passing between isolates. 2022-12-07 20:56:02 +00:00
IsolateSendExitLatency
IsolateSpawn [benchmarks] Use gen_kernel instead of dart2js for isolate group benchmarks. 2022-11-21 22:25:59 +00:00
IsolateSpawnMemory [benchmarks] Use gen_kernel instead of dart2js for isolate group benchmarks. 2022-11-21 22:25:59 +00:00
Iterators Spelling tests web 2023-01-05 01:26:52 +00:00
ListCopy
LongStringCompare/dart Spelling benchmarks 2022-12-20 12:36:37 +00:00
MapCopy
MapLookup
MD5
MultipleReturns/dart [tests, benchmarks] Reformat using new Dart formatter 2023-03-01 18:15:09 +00:00
NativeCall
ObjectHash Revert accidental change in ObjectHash benchmark 2023-01-03 09:50:38 +00:00
Omnibus Add MapCopy to Omnibus benchmarks 2022-06-28 19:53:23 +00:00
OmnibusDeferred Add MapCopy to Omnibus benchmarks 2022-06-28 19:53:23 +00:00
RecordCollections/dart [tests, benchmarks] Reformat using new Dart formatter 2023-03-01 18:15:09 +00:00
Richards Fixed various typos in a lot of files 2022-07-25 12:21:59 +00:00
RuntimeType
SDKArtifactSizes Remove dartanalyzer from SDKArtifactSizes benchmark 2022-07-19 10:51:45 +00:00
SendPort
SHA1
SHA256
SkeletalAnimation
SkeletalAnimationSIMD
SoundSplayTreeSieve Spelling sdk 2023-01-20 12:37:49 +00:00
Startup [benchmarks] Use gen_kernel instead of dart2js for isolate group benchmarks. 2022-11-21 22:25:59 +00:00
StringPool
SwitchFSM/dart [benchmark] Benchmark for switch on various constant types 2023-03-10 04:21:13 +00:00
TypedDataDuplicate
TypedDataPoly/dart Spelling pkg 2023-01-19 10:06:29 +00:00
TypeLiteral/dart
Utf8Decode
Utf8Encode [tests, benchmarks] Reformat using new Dart formatter 2023-03-01 18:15:09 +00:00
analysis_options.yaml
OWNERS