1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-08 20:16:39 +00:00
Commit Graph

6 Commits

Author SHA1 Message Date
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
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