Commit graph

8 commits

Author SHA1 Message Date
Jonas Termansen 80621fed03 [benchmark] Add language version comments to benchmarks.
Change-Id: I44047a9d7907d166a6360397d0047ce9b835e5c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166854
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2020-10-13 01:43:22 +00:00
Alexander Markov 9ae1448ef0 [benchmarks] Add more test cases to ListCopy benchmarks.
This is the follow-up for the discussion on
https://dart-review.googlesource.com/c/sdk/+/152700

Change-Id: Ifeeafcdc312c4f7df7e0be1cc806b972b8c18078
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152709
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
2020-07-01 16:01:40 +00:00
Alexander Markov 8ef90b8641 [benchmarks] Remove expensive Iterable.cast from NNBD version of ListCopy benchmark
Dart 2 version of this benchmark doesn't have this call.
Dart 3 (NNBD) is more strict and allows implicit casts only if casting
from dynamic, so it highlights places where types are incompatible.

However, Iterable.cast<int>() has a high overhead and it doesn't look
like a right way to suppress static type check in this case, as it
creates a new Iterable which would additionally cast each element.
Simple 'input as dynamic' cast is enough in this case and reflects
what was happening in Dart 2 case when types are incompatible.

Fixes https://github.com/dart-lang/sdk/issues/42506

Change-Id: I8d83796a53b53e6f567f533f3d5369cd29f6ad97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152700
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-06-26 22:51:08 +00:00
William Hesse 095deb888f Migrate ListCopy benchmark to null safety, clean up lints
Change-Id: Id7b8b64727e08ad1a5ab0bec7ad692ec64fa3848
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152329
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-06-25 15:28:54 +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
Stephen Adams 7c977188dd [benckmark] Apply code review suggestion to TBR-ed ListCopy benchmark fix
Change-Id: I5a990bb21d4cc62e6ec6ff7428e126d3044b515a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140721
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-03-24 00:22:45 +00:00
Stephen Adams 13e56c6a3a null-safety fixes for ListCopy benchmark setup
Change-Id: I0de8ba7cb1a04aba35a6b722b0fcdd8946ce9737
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140241
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-03-20 20:36:13 +00:00
Stephen Adams a106ad0042 List copy benchmark
Change-Id: I25822ce9f2159ae801dc8c0953c1f9638b15d7f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131261
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-01-14 06:16:35 +00:00