mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[vm] Disable inlining of _StringBase._createOneByteString
If _StringBase._createOneByteString is inlined it becomes much slower due to https://github.com/dart-lang/sdk/issues/37800. This workaround improves Base64Encoder benchmark on ia32 in bytecode mode: Base64Encoder(RunTime): 63.31 -> 46.7 us. Issue: https://github.com/dart-lang/sdk/issues/37800 Change-Id: Ibcf5dc7bfd25bac0bd61a9dcb196c553c82f3dc1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112647 Reviewed-by: Aart Bik <ajcbik@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
parent
92562dc5a5
commit
c0d1dedd78
|
@ -219,6 +219,8 @@ abstract class _StringBase implements String {
|
|||
return createFromCharCodes(charCodeList, 0, length, bits);
|
||||
}
|
||||
|
||||
// Inlining is disabled as a workaround to http://dartbug.com/37800.
|
||||
@pragma("vm:never-inline")
|
||||
static String _createOneByteString(List<int> charCodes, int start, int len) {
|
||||
// It's always faster to do this in Dart than to call into the runtime.
|
||||
var s = _OneByteString._allocate(len);
|
||||
|
|
Loading…
Reference in a new issue