Stream: git-wasmtime

Topic: wasmtime / PR #4181 Reuse Cranelift codegen contexts acro...


view this post on Zulip Wasmtime GitHub notifications bot (May 23 2022 at 17:23):

bnjbvr opened PR #4181 from reuse-context to main:

cranelift-codegen has a context that may be reused to spare memory allocations, and it happens that it is not reused in wasmtime right now, but instead re-created for each function compilation. I've extended the sharing of the FuncTranslator data type during compilation to cranelift_codegen::Context too.

This causes tiny speedups of compile times, but in the noise range:

I've also implemented batch compilation, i.e. group functions together based on the bytecode size until it reaches some predefined threshold and send that as a unit of work per thread. That was something implemented in Spidermonkey and which helped lower the overhead cost of parallelization. But in wasmtime I only got slowdowns, independently of the benchmark, independently of the thresholds... so I guess rayon does already a great job with work stealing etc. I've removed the batch compilation from this PR, but the code is in this branch if people are interested.

view this post on Zulip Wasmtime GitHub notifications bot (May 23 2022 at 17:47):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 24 2022 at 09:03):

bnjbvr merged PR #4181.


Last updated: Nov 22 2024 at 17:03 UTC