Stream: wamr

Topic: AoT compilation results in worse performance than interp?


view this post on Zulip mainrs (Sep 17 2025 at 08:14):

Are there cases where AoT consistently runs worse (in terms of execution time) than interpreted or fast-interpreted?F
My Wasm binary basically allocates a struct on the heap, sets some values to random values using rand(), and returns the memory address of the struct.

The struct gets freed later on the host side. I see consistent peaks that tank performance at around every 10 invocations at a frequency of 500Hz.

The boxplot looks wild compared to the interpreted version, with even the means being the same, and the 25% quantiles are also larger than interpreted.

I was wondering if the memory allocation is the issue. It's probably hard to tell in general, but maybe someone has similar experiences. Thanks!

view this post on Zulip lum1n0us (Sep 18 2025 at 00:40):

That's interesting. Would you mind sharing more details for reproduction?


Last updated: Dec 06 2025 at 06:05 UTC