Closed ZW007 closed 3 years ago
That's a good question; more data and investigation on this would certainly be useful! (Though in the medium-to-long term, the plan is to merge Lucet and Wasmtime so it may not matter as much.)
My suspicion is that this has to do with the FuncEnvironment
that each compiler plugs into the Cranelift backend -- this allows a user of Cranelift to customize the code sequences for certain operations, such as heap accesses or function calls. So perhaps the differences in those sequences or the data structures that they access account for some of the performance delta. But this could use more study!
@ZW007 while as Chris says in the long term this might matter less, I think it'd be great to find the source of the difference nevertheless. Do you by any chance have code you could share that shows this difference in performance?
@tschneidereit Hi Till. I tested several. For example, a matrix task that takes seconds to finish
Lucet is slow with the default settings.
Adding --reserved-size "4GiB"
to the lucetc-wasi
command immediately makes its performance match wasmtime
's.
Hi! Lucet has a shorter startup time, but why for many heavy tasks, lucet is slower than wasmtime. They both use cranelift for generating machine code from wasm, right?