Stream: git-wasmtime

Topic: wasmtime / PR #4662 Cranelift: Use bump allocation in `re...


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

fitzgen edited 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 18:50):

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

This makes compilation 2-6% faster for Sightglass's bz2 benchmark:

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

  Δ = 7290648.36 ± 4245152.07 (confidence = 99%)

  bump.so is 1.02x to 1.06x faster than main.so!

  [166388177 183238542.98 214732518] bump.so
  [172836648 190529191.34 217514271] main.so

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

  No difference in performance.

  [182220055 225793551.12 277857575] bump.so
  [193212613 227784078.61 277175335] main.so

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

  No difference in performance.

  [3848442474 4295214144.37 4665127241] bump.so
  [3969505457 4262415290.10 4563869974] main.so

Last updated: Nov 22 2024 at 16:03 UTC