mirror of
https://github.com/dart-lang/sdk
synced 2024-09-06 00:59:09 +00:00
![]() * Check against raw `EfficientLengthIterable` instead of specifying its type parameter. Both checks are equivalent in this context as `EfficientLengthIterable` is an internal marker interface and an instance of `Iterable<T>` can never be an instance of `EfficientLengthIterable` but not an instance of `EfficientLengthIterable<T>`. VM compiler is currently not good enough to eliminate the `is` check if involves an uninstantiated type (see https://dartbug.com/53445). * Force inlining of `IndexedIterable` factory, `IndexedIterable.get iterator` and `IterableExtensions.indexed`. These changes significantly reduce overhead of for-in-indexed when compared to baseline classical loop: before these changes for-in-indexed is 13x slower than classical loop, after these changes it is only 2.8x slower. Performance comparison was using the following benchmark kernels: ```dart final list = List<int>.generate(10000, (i) => i); // For for-in-indexed var result = 0; for (var (i, e) in list.indexed) { result ^= (i & e); } // For classical loop var result = 0; for (var i = 0; i < list.length; i++) { result ^= (i & list[i]); } ``` CoreLibraryReviewExempt: No API changes, VM specific optimisations. Change-Id: Ic935a2aab2eda0837981184d872ee1eeef89ee7a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324461 Reviewed-by: Lasse Nielsen <lrn@google.com> Commit-Queue: Slava Egorov <vegorov@google.com> |
||
---|---|---|
.. | ||
_http | ||
_internal | ||
_wasm | ||
async | ||
cli | ||
collection | ||
convert | ||
core | ||
developer | ||
ffi | ||
html | ||
indexed_db/dart2js | ||
internal | ||
io | ||
isolate | ||
js | ||
js_interop | ||
js_interop_unsafe | ||
js_util | ||
math | ||
mirrors | ||
svg/dart2js | ||
typed_data | ||
vmservice | ||
web_audio/dart2js | ||
web_gl/dart2js | ||
web_sql/dart2js | ||
analysis_options.yaml | ||
libraries.json | ||
libraries.yaml | ||
PRESUBMIT.py | ||
vmservice_libraries.json | ||
vmservice_libraries.yaml |