[benchmarks] Remove expensive Iterable.cast from NNBD version of ListCopy benchmark
[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 <239e774fd29abc1267878f57afe1a8a03e0ca887@google.com>
Reviewed-by: Régis Crelier <c2bf536a10d9f2530c38e4e8da517718be8c39ce@google.com>
Reviewed-by: William Hesse <a821cddceae7dc400f272e3cb1a72f400f9fed6d@google.com>

dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk