Skip to content

Commit

Permalink
[dart2wasm] More dart:convert micro optimizations
Browse files Browse the repository at this point in the history
This does some micro-optimizations in UTF-8 decoder that wasm-opt
doesn't do for us.

- Inline some small and/or single-use functions.

- Instead of passing `U8List` to parser functions, pass the `array i8`
  of the `U8List`. This eliminates a layer of indirection when accessing
  the array in loops.

- Copy `_Utf8Decoder.transitionTable` and `_Utf8Decoder.typeTable`,
  which are `String`s, as `array i8`s. This also eliminates a layer of
  indirection when accessing the tables.

CoreLibraryReviewExempt: added dart2wasm inline pragma.
Change-Id: I1fd2b6a94e74e1565ba87068299cb80f5a0e9e94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405480
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
  • Loading branch information
osa1 authored and Commit Queue committed Jan 24, 2025
1 parent 8ed5503 commit da9de5a
Show file tree
Hide file tree
Showing 2 changed files with 250 additions and 96 deletions.
Loading

0 comments on commit da9de5a

Please sign in to comment.