You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[vm/compiler] Streamline code generated for empty list literals
Previously, empty list literals were generated as
List<E>._fromLiteral(const [])
List._fromLiteral checks if the argument is an empty list and
calls _GrowableList<E>(0) in such case.
If List._fromLiteral is not inlined, this adds an unnecessary overhead.
Now empty list literals are generated more directly as
_GrowableList<E>(0)
Havlak +15.58% in AOT mode with null safety.
Change-Id: I6723e1e912cd0bbcbbb622f928d912c554217e5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159201
Commit-Queue: Alexander Markov <[email protected]>
Reviewed-by: Vyacheslav Egorov <[email protected]>
Reviewed-by: Régis Crelier <[email protected]>
0 commit comments