diff options
author | Alon Zakai <azakai@google.com> | 2023-05-15 15:00:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 15:00:49 -0700 |
commit | 44cd751d9feda7c4b4b6c9d6af1e71541b90abac (patch) | |
tree | b0a05fc26f027714ce0d45752ee44812768e0658 /test/example/cpp-unit.cpp | |
parent | 71a151240241fd50c42d88fe0ba9800c03527387 (diff) | |
download | binaryen-44cd751d9feda7c4b4b6c9d6af1e71541b90abac.tar.gz binaryen-44cd751d9feda7c4b4b6c9d6af1e71541b90abac.tar.bz2 binaryen-44cd751d9feda7c4b4b6c9d6af1e71541b90abac.zip |
[NFC] Optimize ArrayNew zero construction (#5722)
All array elements have the same type, so we can construct a single zero
and just copy it.
This makes ArrayNew of large arrays 2x faster. I also experimented with
putting Literal::makeZero in a header, in hopes of inlining leading to
licm helping here, but that did not help at all unfortunately, at least not
in gcc.
Diffstat (limited to 'test/example/cpp-unit.cpp')
0 files changed, 0 insertions, 0 deletions