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

Issue 485043002: Optimize List.toList/.sublist and List.from on lists. (Closed)

Created:
6 years, 4 months ago by Lasse Reichstein Nielsen
Modified:
6 years, 3 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Optimize List.toList/.sublist and List.from on lists. R=fschneider@google.com, srdjan@google.com Committed: https://code.google.com/p/dart/source/detail?r=39579

Patch Set 1 #

Total comments: 3

Patch Set 2 : Also optimize _GrowableList.addAll #

Patch Set 3 : Even more efficient _GrowableList.addAll #

Patch Set 4 : Improve performance of toList on GrowableList/ImmutableList by not using Lists.copy for simple loop. #

Patch Set 5 : Concurrent-modification detection in addAll. #

Patch Set 6 : Now without typo #

Patch Set 7 : Avoid calling _GrowableList.withData with empty list. #

Total comments: 4

Patch Set 8 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -31 lines) Patch
M runtime/lib/array.dart View 1 2 3 4 5 6 7 4 chunks +39 lines, -13 lines 0 comments Download
M runtime/lib/array_patch.dart View 1 chunk +16 lines, -0 lines 0 comments Download
M runtime/lib/class_id.dart View 1 chunk +1 line, -1 line 0 comments Download
M runtime/lib/growable_array.dart View 1 2 3 4 5 6 7 3 chunks +45 lines, -8 lines 0 comments Download
M sdk/lib/_internal/lib/core_patch.dart View 1 1 chunk +10 lines, -0 lines 0 comments Download
M sdk/lib/core/list.dart View 1 chunk +1 line, -8 lines 0 comments Download
M tests/corelib/corelib.status View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A tests/corelib/growable_list_test.dart View 1 2 3 4 5 1 chunk +132 lines, -0 lines 0 comments Download
M tests/corelib/iterable_return_type_test.dart View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Lasse Reichstein Nielsen
6 years, 4 months ago (2014-08-19 12:44:23 UTC) #1
Lasse Reichstein Nielsen
https://codereview.chromium.org/485043002/diff/1/runtime/lib/array.dart File runtime/lib/array.dart (right): https://codereview.chromium.org/485043002/diff/1/runtime/lib/array.dart#newcode70 runtime/lib/array.dart:70: if (ClassID.getID(iterable) == ClassID.cidOneByteString) { This looks wrong: OneByteString? ...
6 years, 4 months ago (2014-08-19 12:48:31 UTC) #2
Lasse Reichstein Nielsen
Should be stable now, PTAL.
6 years, 4 months ago (2014-08-21 11:04:25 UTC) #3
srdjan
LGTM after verifying that there are no performance regressions.
6 years, 4 months ago (2014-08-22 18:31:51 UTC) #4
Lasse Reichstein Nielsen
lrn@google.com changed reviewers: + fschneider@google.com
6 years, 3 months ago (2014-08-26 13:06:26 UTC) #5
Lasse Reichstein Nielsen
6 years, 3 months ago (2014-08-26 13:06:26 UTC) #6
Florian Schneider
LGTM. The crash would have been caught by our assertions if the setLength method was ...
6 years, 3 months ago (2014-08-26 13:17:06 UTC) #7
Lasse Reichstein Nielsen
https://codereview.chromium.org/485043002/diff/120001/runtime/lib/array.dart File runtime/lib/array.dart (right): https://codereview.chromium.org/485043002/diff/120001/runtime/lib/array.dart#newcode514 runtime/lib/array.dart:514: var length = this.length; Yes, good catch. https://codereview.chromium.org/485043002/diff/120001/runtime/lib/growable_array.dart File ...
6 years, 3 months ago (2014-08-26 13:46:53 UTC) #8
Lasse Reichstein Nielsen
6 years, 3 months ago (2014-08-27 08:01:00 UTC) #9
Message was sent while issue was closed.
Committed patchset #8 manually as 39579 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698