fitzgen opened PR #4618 from dont-canonicalize-multiple-times
to main
:
It was previously canonicalizing the struct-return pointer internally, but some callers already had a canonicalized signature that they were giving it. This resulted in some unnecessary no-op copies of the signature, and therefore unnecessary heap allocations. Now, instead, we make it an invariant that callers always pass a canonicalized signature.
Gives a ~5% speedup to compilation on the Sightglass's Spidermonkey benchmark, and no difference in performance on the others:
compilation :: nanoseconds :: benchmarks/spidermonkey/benchmark.wasm Δ = 120607087.58 ± 33517739.42 (confidence = 99%) main.so is 0.95x to 0.97x faster than feature.so! feature.so is 1.03x to 1.06x faster than main.so! [2768415639 2868809793.49 3149141782] main.so [2479287976 2748202705.91 3044819409] feature.so compilation :: nanoseconds :: benchmarks/bz2/benchmark.wasm No difference in performance. [76865944 84866240.58 95562639] main.so [75639139 84154259.01 96727948] feature.so compilation :: nanoseconds :: benchmarks/pulldown-cmark/benchmark.wasm No difference in performance. [113503142 133806222.94 150176738] main.so [115003031 133491736.64 164840112] feature.so
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
fitzgen requested cfallin for a review on PR #4618.
cfallin submitted PR review.
fitzgen updated PR #4618 from dont-canonicalize-multiple-times
to main
.
fitzgen updated PR #4618 from dont-canonicalize-multiple-times
to main
.
fitzgen updated PR #4618 from dont-canonicalize-multiple-times
to main
.
fitzgen requested cfallin for a review on PR #4618.
Last updated: Dec 23 2024 at 13:07 UTC