Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dart2wasm] Remove short input threshold to fall back to native UTF-8…
… decoder When decoding a JS array input as UTF-8 we currently fall back to the decoder implemented in Dart when the input is small. When benchmarked with `benchmark_harness`, for one byte array, I get 6.0us when decoded with the Dart decoder, and 5.8us when decoded with JS `TextDecoder`. So it looks like Dart decoder is never faster when the input is a JS array. Remove the threshold and always call JS when the input is a JS array. (This threshold was copied from dart2js, where accessing JS data is less expensive.) Change-Id: I1a34fd1f38718e34a1ff7bac0d7c6178bf6dd469 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405002 Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Ömer Ağacan <[email protected]>
- Loading branch information