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 Roll benchmark_harness and use AsyncBenchmarkBase. 2022-05-02 09:27:49 +00:00
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 [vm/ffi] Optimize Pointer<T>.asTypedList() 2021-11-29 17:38:04 +00:00
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 [benchmarks] Follow-up to "Roll benchmark_harness" 2022-05-02 12:26:41 +00:00
IsolateBaseOverhead [vm/concurrency] Add IsolateBaseOverhead benchmark 2022-05-30 08:14:52 +00:00
IsolateFibonacci [vm/concurrency] Remove --(no-)enable-isolate-groups flag usage in tests 2021-11-04 18:57:21 +00:00
IsolateJson
IsolateRegExp/dart [benchmarks] Add IsolateRegExp benchmark for regexp passing between isolates. 2022-12-07 20:56:02 +00:00
IsolateSendExitLatency Move benchmark IsolateSendExitLatency to correct directory 2022-06-07 16:50:40 +00:00
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 [benchmark] Add MapCopy benchmark 2022-01-06 03:32:34 +00:00
MapLookup
MD5
MultipleReturns/dart [tests, benchmarks] Reformat using new Dart formatter 2023-03-01 18:15:09 +00:00
NativeCall [benchmark] Adds native call benchmark. 2021-11-04 15:16:24 +00:00
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 [vm] Add TypeLiteral benchmark 2022-04-25 08:49:12 +00:00
Utf8Decode
Utf8Encode [tests, benchmarks] Reformat using new Dart formatter 2023-03-01 18:15:09 +00:00
analysis_options.yaml
OWNERS [infra] Add OWNERS to the Dart SDK 2022-02-14 14:06:34 +00:00