mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:27:43 +00:00
405a03909c
Intercept all `Utf8Decoder.convert` calls to check the input type and call the right UTF8 decoder function. This currently only optimizes `U8List` parsing, and only the fastest path where the input is an ASCII string. Follow-up CLs will optimize JS typed array parsing by calling browser's UTF8 decoder and the slow paths of non-ASCII and malformed buffers. Results from an internal benchmark extracted from a real use case: Before: Parse(RunTime): 330,500 us. After: Parse(RunTime): 90,310 us. (-72%) dart2js -O4 results of the same benchmark: Parse(RunTime): 234,250 us. Change-Id: I470697a9eb516e1e031e9b865ddb29e8f25569bf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331187 Commit-Queue: Ömer Ağacan <omersa@google.com> Reviewed-by: Jackson Gardner <jacksongardner@google.com> |
||
---|---|---|
.. | ||
bin | ||
lib | ||
.gitignore | ||
api_readme.md | ||
BUILD.gn | ||
OWNERS |