1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-05 17:30:16 +00:00
dart-sdk/benchmarks/FfiStructCopy
Daco Harkes a7163dba81 [benchmarks/ffi] Add FfiStructCopy benchmark
`_memCopy` inside `dart:ffi` is currently doing a per-byte copy in
Dart. This is rather slow, we should optimize this with the
`MemoryCopyInstr` in the VM.

This CL adds benchmarks to report the number of bytes copied per
second.

Adds only benchmarks with copies of 32^(0..3), as non-power-of-two
benchmarks did not seem to behave differently.

Since legacy mode is no longer benchmarked, the dart2 version of this
benchmark is omitted.

Benchmarks set up according to
https://dart-review.googlesource.com/c/sdk/+/200188

Bug: https://github.com/dart-lang/sdk/issues/43967
Change-Id: I3d9be8de725820fd3365a7dc85d15174bddc1ae6
Cq-Include-Trybots: luci.dart.try:benchmark-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277522
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-12-29 10:21:19 +00:00
..
dart
generate_benchmarks.dart