mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:39:49 +00:00
db63e89fcf
Because we cache on instances of type objects, all "type"-ish constructs in DDC must be pre-initialized if we want to avoid any hasOwnProperty checks (which are slow). 1) We now consult legacy/nullable caches earlier when wrapping types, as the downstream logic can be much slower than a lookup. 2) We cache on nullble and legacy wrappers themselves as well as just the underlying object (formerly we cached on just the latter) for faster lookups. 3) We attach local caches upfront, maintaining monomorphicity during hot code paths. This improves regressions for opt-out worst-case tests from (120 us -> 2100 us) to (120 us -> 500 us) and weak mode tests from (120 us -> 1100 us) to (120 us -> 330 us). Change-Id: I98a26064404e746162ca3feb22b0993c3b39e63c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138330 Commit-Queue: Mark Zhou <markzipan@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com> |
||
---|---|---|
.. | ||
_http | ||
_internal | ||
async | ||
cli | ||
collection | ||
convert | ||
core | ||
developer | ||
ffi | ||
html | ||
indexed_db/dart2js | ||
internal | ||
io | ||
isolate | ||
js | ||
js_util | ||
math | ||
mirrors | ||
svg/dart2js | ||
typed_data | ||
vmservice | ||
wasm | ||
web_audio/dart2js | ||
web_gl/dart2js | ||
web_sql/dart2js | ||
libraries.json | ||
libraries.yaml | ||
vmservice_libraries.json | ||
vmservice_libraries.yaml |