dart-sdk/benchmarks
Daco Harkes c7422d5277 [benchmarks/ffi] Memory access with asTypedList
Adds benchmarks using `asTypedList` on Pointers to investigate from
where it pays of to do construct a TypedData to do memory access
instead of on the Pointer directly.

x64 JIT results:
- Memory access on TypedData (int8) is ~2,5 faster than on Pointer.
FfiMemory.PointerInt8(RunTime): 72.23885718413639 us.
FfiMemory.PointerInt8TypedDataReuse(RunTime): 28.239710263614928 us.

- Constructing the TypedData for 1000 reads + 1000 writes takes ~20%
  of the total runtime, 400 reads or writes on TypedData, 160 reads
  or writes on Pointer.
FfiMemory.PointerInt8TypedDataNew(RunTime): 34.345480148372026 us.
FfiMemory.PointerInt8TypedDataReuse(RunTime): 28.239710263614928 us.

x64 AOT results:
FfiMemory.PointerInt8(RunTime): 13.862134213116345 us.
FfiMemory.PointerInt8TypedDataNew(RunTime): 26.149628021913365 us.
FfiMemory.PointerInt8TypedDataReuse(RunTime): 24.73322780505299 us.
- Using asTypedList is slower. (Some optimizations fail to kick in.)

Change-Id: I401edb88baf3a3c5094ecae808f122adf258da28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/186289
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-02-23 12:41:49 +00:00
..
BigIntParsePrint [benchmark] BigIntParsePrint: fix lints 2021-01-11 17:42:06 +00:00
Calls [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
Dynamic [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
EventLoopLatencyJson [vm] Change EventLoopLatency benchmark to use RunTimeRaw latency 2020-10-23 18:31:01 +00:00
EventLoopLatencyJson350KB [vm/concurrency] Add EventLoopLatencyJson350KB bechmark 2020-10-28 16:28:38 +00:00
Example [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
FfiBoringssl Reland "[vm/ffi] Roll package:ffi to Allocator and Opaque" 2021-02-10 10:19:28 +00:00
FfiCall [ffi/benchmark] Fix FfiCall branchmarks. 2021-02-23 08:41:39 +00:00
FfiMemory [benchmarks/ffi] Memory access with asTypedList 2021-02-23 12:41:49 +00:00
FfiStruct Reland "[vm/ffi] Roll package:ffi to Allocator and Opaque" 2021-02-10 10:19:28 +00:00
Isolate [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
IsolateJson [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
IsolateSpawn [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
IsolateSpawnMemory [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
ListCopy [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
MD5 [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
Omnibus [benchmarks] Omnibus benchmark 2020-11-28 20:36:06 +00:00
OmnibusDeferred [benchmarks] Omnibus benchmark 2020-11-28 20:36:06 +00:00
RuntimeType [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
SHA1 [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
SHA256 [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
SkeletalAnimation [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
SkeletalAnimationSIMD [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
SoundSplayTreeSieve [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
TypedDataDuplicate [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
Utf8Decode [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
Utf8Encode [benchmark] Add language version comments to benchmarks. 2020-10-13 01:43:22 +00:00
analysis_options.yaml Roll benchmarks-internal to 02695da98bcf006b95630d3c386f4169d7ec4ecf 2020-06-26 01:56:03 +00:00