Commit 44cd751
authored
[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.1 parent 71a1512 commit 44cd751
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1642 | 1642 | | |
1643 | 1643 | | |
1644 | 1644 | | |
| 1645 | + | |
1645 | 1646 | | |
1646 | | - | |
| 1647 | + | |
1647 | 1648 | | |
1648 | 1649 | | |
1649 | 1650 | | |
| |||
0 commit comments