kaivol opened PR #9892 from kaivol:optimize-component-model-fp-performance
to bytecodealliance:main
:
Added overrides for
Lower::store_list
andLift::load_list
for floating point numbers to reduce overhead when passing or returninglist<f32>
andlist<f64>
to/from components.I based this on the respective implementation for integers.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
dicej assigned dicej to PR #9892.
dicej submitted PR review:
Thanks for this! Looks reasonable to me overall; see my comments inline regarding the details.
dicej created PR review comment:
Again, these comments should be updated to discuss floating point types rather than integer types.
dicej created PR review comment:
This paragraph (and the code that follows) refers to
$integer
, but we really care about$float
, right? We should rewrite this to talk about floating point numbers instead of integers, e.g. "allu8
patterns are valid$float
patterns since$float
is a IEEE 754 floating point type."
dicej created PR review comment:
let (before, middle, end) = unsafe { dst.align_to_mut::<$float>() };
Presumably the alignment of e.g.
f32
andu32
should be the same, but we might as well be precise here (and in similar code below).
Thanks for the review!
I'm a bit busy at the moment but I'll look into it when i find some time.
Last updated: Jan 24 2025 at 00:11 UTC