Commit graph

6 commits

Author SHA1 Message Date
Daco Harkes d87046342f [benchmarks/ffi] Add FfiCall benchmark with Handles
On x64 desktop in JIT the trampolines with Handles are a bit slower
than trampolines passing integers or Pointers.

FfiCall.Uint64x01(RunTime): 200.8482627033541 us.
FfiCall.PointerUint8x01(RunTime): 261.3910088865656 us.
FfiCall.Handlex01(RunTime): 355.4978670458585 us.
FfiCall.Handlex02(RunTime): 384.86376755820663 us.
FfiCall.Handlex04(RunTime): 492.896007885658 us.
FfiCall.Handlex10(RunTime): 846.1214043993232 us.
FfiCall.Handlex20(RunTime): 1193.412291169451 us.

Issue: https://github.com/dart-lang/sdk/issues/36858
Issue: https://github.com/dart-lang/sdk/issues/41319

New issue for optimizing multiple handles:
https://github.com/dart-lang/sdk/issues/42341

Also cleans up dart2/native which was erroneously left over from the
benchmark duplication for NNBD.

Change-Id: I81223fefc47129d00984492efb9502d5449f0d4a
Cq-Include-Trybots: luci.dart.try:benchmark-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145593
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-06-15 13:27:16 +00:00
Jonas Termansen 0f505e0e08 [benchmark] Fix oversights from the benchmark fork.
The shared libraries for the FfiBoringssl benchmark had been moved up a
level but unfortunately the same change wasn't made for the FfiCall
benchmark.

The IsolateJson benchmark had a typo in the path and broke.

Change-Id: Iec2fec1d5508022d9cfbfb040d80c74b078a0640
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150024
Reviewed-by: William Hesse <whesse@google.com>
2020-06-04 11:00:20 +00:00
Jonas Termansen 6f66f82625 [benchmark] Fork benchmarks for null safety and pin internal ones.
This change forks the benchmarks for the null safety feature where there
now is a null safe version at benchmarks/Foo/dart and a legacy Dart 2
version at benchmarks/Foo/dart2. This change allows benchmarks to be
migrated per go/dart-nnbd-benchmark-migration.

Additionally this change pins the internal benchmarks which have been
moved into their own repository and is now versioned along with the Dart
SDK.

The dart2 implementation will be benchmarked instead of the null safe
dart implementation as of this change. The null safe dart implementation
will be used when null safe benchmarking is turned on.

Change-Id: If039fd7100c960169f4161c1d98167aca0af2ded
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148440
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-02 12:53:24 +00:00
Samir Jindel c885bdde1d [vm] DBC is obsolete. Remove dead code.
Change-Id: Ica33af158cca53c8e951e4b2582de83660e8a60d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121851
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-27 18:18:29 +00:00
Samir Jindel 63d3012e68 [vm/ffi] Deprecate Pointer.allocate/free.
Fixes https://dart-review.googlesource.com/c/sdk/+/118442.

Also updates untested sample code in samples/ffi.

Change-Id: Id40a7b8fbb35c5d989269646ebb22864cebcfcac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118441
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-10 13:17:43 +00:00
Daco Harkes fbf13f561f [benchmarks/ffi] Add micro and macro benchmarks for dart:ffi
Adds micro benchmarks to measure low level (1) C memory reads and writes from Dart and (2) calls from Dart into C. This CL also adds a macro benchmark to measure overall performance using BoringSSL to digest data. The shared libraries are precompiled for Linux and live in cipd packages. The benchmarks run on all hardware architectures (with the exception of Linux'es hardfp on Arm32: https://github.com/dart-lang/sdk/issues/36309).

Issue: https://github.com/dart-lang/sdk/issues/36247

Change-Id: I8dfb30cc66a26a2942bb09194c5eb0da0b6ca1b5
Cq-Include-Trybots: luci.dart.try:benchmark-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108724
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
2019-07-19 14:59:57 +00:00