Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Issue 1999793002: Make Iterable.toList more efficient if the length is known. (Closed)

Created:
4 years, 7 months ago by Lasse Reichstein Nielsen
Modified:
4 years, 7 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Make Iterable.toList more efficient if the length is known. Add more tests. Fix (some) bugs found by tests. R=floitsch@google.com Committed: https://github.com/dart-lang/sdk/commit/fbf64bb7a5ec7794c11b843c88f1a3b2c7c7907e

Patch Set 1 #

Total comments: 1

Patch Set 2 : Removed unnecessary optimization. #

Patch Set 3 : Avoid iterator for empty list #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -72 lines) Patch
M runtime/lib/array_patch.dart View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M runtime/lib/typed_data.dart View 6 chunks +40 lines, -1 line 0 comments Download
M sdk/lib/collection/queue.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/core/iterable.dart View 1 1 chunk +3 lines, -2 lines 0 comments Download
M tests/corelib/corelib.status View 1 2 chunks +1 line, -3 lines 0 comments Download
M tests/corelib/iterable_to_list_test.dart View 1 chunk +61 lines, -61 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
Lasse Reichstein Nielsen
4 years, 7 months ago (2016-05-20 12:40:59 UTC) #2
floitsch
LGTM. https://codereview.chromium.org/1999793002/diff/1/sdk/lib/core/iterable.dart File sdk/lib/core/iterable.dart (right): https://codereview.chromium.org/1999793002/diff/1/sdk/lib/core/iterable.dart#newcode340 sdk/lib/core/iterable.dart:340: if (this is! EfficientLength) { This check is ...
4 years, 7 months ago (2016-05-20 12:46:02 UTC) #3
Lasse Reichstein Nielsen
4 years, 7 months ago (2016-05-23 08:01:07 UTC) #5
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
fbf64bb7a5ec7794c11b843c88f1a3b2c7c7907e (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698