Stream: git-wasmtime

Topic: wasmtime / PR #4662 WIP Cranelift: Avoid many small alloc...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 09 2022 at 18:39):

fitzgen opened PR #4662 from big-alloc-in-remove-constant-phis to main:

By having a single, large allocation instead.

The motivation is that the SmallVec for each block's outgoing edges' actual argument values was often running out of their inline capacity and triggering heap allocations.

Unfortunately, this seems to ultimately be a ~3% slow down on our spidermonkey.wasm benchmark, probably due to the new bounds checks caused from indexing into the single large allocation.

compilation :: cycles :: benchmarks/spidermonkey/benchmark.wasm

  Δ = 121036165.40 ± 64555091.05 (confidence = 99%)

  main.so is 1.01x to 1.05x faster than backing-values.so!

  [3983134514 4236785350.52 4613932381] backing-values.so
  [3790337770 4115749185.12 4653228728] main.so

compilation :: cycles :: benchmarks/bz2/benchmark.wasm

  No difference in performance.

  [165139806 179373271.11 208813013] backing-values.so
  [165229705 175595715.17 202773232] main.so

compilation :: cycles :: benchmarks/pulldown-cmark/benchmark.wasm

  No difference in performance.

  [188779955 224630804.71 270825205] backing-values.so
  [189541100 222431248.35 281750519] main.so

Just opening this PR for posterity and if anyone else gets any ideas here.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2022 at 17:30):

fitzgen updated PR #4662 from big-alloc-in-remove-constant-phis to main.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 15 2022 at 18:08):

fitzgen closed without merge PR #4662.


Last updated: Dec 23 2024 at 12:05 UTC