Stream: git-wasmtime

Topic: wasmtime / PR #9892 Override component model `Lower::stor...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 23 2024 at 00:02):

kaivol opened PR #9892 from kaivol:optimize-component-model-fp-performance to bytecodealliance:main:

Added overrides for Lower::store_list and Lift::load_list for floating point numbers to reduce overhead when passing or returning list<f32> and list<f64> to/from components.

I based this on the respective implementation for integers.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jan 02 2025 at 17:06):

dicej assigned dicej to PR #9892.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 02 2025 at 17:33):

dicej submitted PR review:

Thanks for this! Looks reasonable to me overall; see my comments inline regarding the details.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 02 2025 at 17:33):

dicej created PR review comment:

Again, these comments should be updated to discuss floating point types rather than integer types.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 02 2025 at 17:33):

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. "all u8 patterns are valid $float patterns since $float is a IEEE 754 floating point type."

view this post on Zulip Wasmtime GitHub notifications bot (Jan 02 2025 at 17:33):

dicej created PR review comment:

                let (before, middle, end) = unsafe { dst.align_to_mut::<$float>() };

Presumably the alignment of e.g. f32 and u32 should be the same, but we might as well be precise here (and in similar code below).

view this post on Zulip Wasmtime GitHub notifications bot (Jan 12 2025 at 22:07):

kaivol commented on PR #9892:

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