Stream: wasmtime

Topic: Winch performance


view this post on Zulip bjorn3 (May 29 2024 at 19:02):

Winch seems to be quite a bit slower than Wasmer's singlepass compiler at least on some programs, see https://github.com/zellij-org/zellij/pull/3349#discussion_r1616170661 and the linked wasmi blog post. Is this just having that everyone has only worked on getting it correct before thinking about optimizing it or are there fundamental reasons it is so much slower?

Zellij is currently unable to update Wasmer as the currently used version is the last one without mandatory wasix support which Zellij doesn't want to adopt for various reasons. In the mean time a ...

view this post on Zulip fitzgen (he/him) (May 29 2024 at 19:05):

clarification: slower at compiling code or produces slower code?

either way, I think the answer is that effort has been going into correctness and completeness, not compile times or code quality (and we would want to be very careful about introducing code improvements, this is very intentionally not an optimizing compiler, see for example: https://www.wingolog.org/archives/2020/03/25/firefoxs-low-latency-webassembly-compiler)

view this post on Zulip bjorn3 (May 29 2024 at 19:05):

Slower at compiling code.

view this post on Zulip fitzgen (he/him) (May 29 2024 at 19:08):

gotcha. yeah I think the answer is just that no one has even started profiling and improving it yet, just focused on correctness and completeness. definitely something we plan to do, just haven't gotten there yet.

also cc @Saúl Cabrera

view this post on Zulip Saúl Cabrera (May 29 2024 at 20:05):

Yeah, agreed with Nick. I have worked on a couple of optimizations for very specific, internal use-cases, but it's still in my todo to hook Winch to Sightglass in order to profile more generally and improve the compilation performance where possible. I don't know much about that other single pass compiler, but I don't think there's a fundamental reason for that performance difference.


Last updated: Dec 23 2024 at 13:07 UTC