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

Issue 858543002: Avoid extra duplication of substrings during string.replaceAll. (Closed)

Created:
5 years, 11 months ago by Lasse Reichstein Nielsen
Modified:
5 years, 11 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Avoid extra duplication of substrings during string.replaceAll. R=asiva@google.com, zerny@google.com Committed: https://code.google.com/p/dart/source/detail?r=43059

Patch Set 1 #

Patch Set 2 : Avoid makeListFixedLength call in Dart. Simple to do in C++. #

Patch Set 3 : Also do replaceAllMapped. #

Total comments: 18

Patch Set 4 : Fix bugs, address comments. #

Patch Set 5 : Abstract add-slice code into separate function. #

Total comments: 4

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+307 lines, -14 lines) Patch
M runtime/lib/string.cc View 1 2 3 1 chunk +149 lines, -0 lines 0 comments Download
M runtime/lib/string_patch.dart View 1 2 3 4 5 2 chunks +157 lines, -13 lines 0 comments Download
M runtime/vm/bootstrap_natives.h View 1 chunk +1 line, -0 lines 0 comments Download
M tests/standalone/typed_data_test.dart View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 12 (2 generated)
Lasse Reichstein Nielsen
A 25-30% improvement on string replaceAll{,Mapped}. Visible in the RegExp benchmark.
5 years, 11 months ago (2015-01-19 11:35:00 UTC) #2
zerny-google
lgtm but let's have the other reviewers take a look too. https://codereview.chromium.org/858543002/diff/40001/runtime/lib/string.cc File runtime/lib/string.cc (right): ...
5 years, 11 months ago (2015-01-20 13:43:11 UTC) #4
Florian Schneider
https://codereview.chromium.org/858543002/diff/40001/runtime/lib/string.cc File runtime/lib/string.cc (right): https://codereview.chromium.org/858543002/diff/40001/runtime/lib/string.cc#newcode116 runtime/lib/string.cc:116: result |= TwoByteString::CharAt(string, i); This should be ExternalTwoByteString::CharAt in ...
5 years, 11 months ago (2015-01-20 16:39:34 UTC) #5
siva
I assuming avoiding duplication should result in better performance, is there a benchmark test to ...
5 years, 11 months ago (2015-01-21 00:29:20 UTC) #6
siva
*I assuming*I am assuming*
5 years, 11 months ago (2015-01-21 00:29:46 UTC) #7
Lasse Reichstein Nielsen
Benchmarks show improvements on the scale (ia32, x64 is comparable): SunSpiderGolemRegexpDna (Intel Core i5) 13% ...
5 years, 11 months ago (2015-01-21 10:48:43 UTC) #8
Lasse Reichstein Nielsen
Patch 5 may have lost ~1-2 percentage improvement on RegExp (preliminary results, benchmarks still running), ...
5 years, 11 months ago (2015-01-21 13:52:10 UTC) #9
siva
LGTM once comments are addressed. https://codereview.chromium.org/858543002/diff/70001/runtime/lib/string_patch.dart File runtime/lib/string_patch.dart (right): https://codereview.chromium.org/858543002/diff/70001/runtime/lib/string_patch.dart#newcode46 runtime/lib/string_patch.dart:46: static const int _maxStartValue ...
5 years, 11 months ago (2015-01-22 00:08:17 UTC) #10
Lasse Reichstein Nielsen
https://codereview.chromium.org/858543002/diff/70001/runtime/lib/string_patch.dart File runtime/lib/string_patch.dart (right): https://codereview.chromium.org/858543002/diff/70001/runtime/lib/string_patch.dart#newcode46 runtime/lib/string_patch.dart:46: static const int _maxStartValue = (1 << (30 - ...
5 years, 11 months ago (2015-01-22 08:25:38 UTC) #11
Lasse Reichstein Nielsen
5 years, 11 months ago (2015-01-22 08:28:00 UTC) #12
Message was sent while issue was closed.
Committed patchset #6 (id:90001) manually as 43059 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698