Skip to content

Commit c0d1ded

Browse files
alexmarkovcommit-bot@chromium.org
authored andcommitted
[vm] Disable inlining of _StringBase._createOneByteString
If _StringBase._createOneByteString is inlined it becomes much slower due to #37800. This workaround improves Base64Encoder benchmark on ia32 in bytecode mode: Base64Encoder(RunTime): 63.31 -> 46.7 us. Issue: #37800 Change-Id: Ibcf5dc7bfd25bac0bd61a9dcb196c553c82f3dc1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112647 Reviewed-by: Aart Bik <[email protected]> Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Alexander Markov <[email protected]>
1 parent 92562dc commit c0d1ded

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

runtime/lib/string_patch.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ abstract class _StringBase implements String {
219219
return createFromCharCodes(charCodeList, 0, length, bits);
220220
}
221221

222+
// Inlining is disabled as a workaround to http://dartbug.com/37800.
223+
@pragma("vm:never-inline")
222224
static String _createOneByteString(List<int> charCodes, int start, int len) {
223225
// It's always faster to do this in Dart than to call into the runtime.
224226
var s = _OneByteString._allocate(len);

0 commit comments

Comments
 (0)