Stream: git-wasmtime

Topic: wasmtime / PR #5001 cranelift-frontend: Replace Vecs with...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 03 2022 at 18:55):

jameysharp requested cfallin for a review on PR #5001.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 03 2022 at 18:55):

jameysharp opened PR #5001 from more-ssa to main:

There are three main themes in this PR:

  1. Replace the Vec and SmallVec in SSABlockData with EntityLists using ListPools kept in the SSABuilder.
  2. Both of those vectors stored pairs, which EntityList doesn't easily support. But in both cases I was able to remove one element of the pair because it was uniquely determined by other information.
  3. Determining the removed Block ID from a branch Inst is slower than just storing the block together with the branch, but I was able to remove most of those lookups.

According to DHAT, compared with main, overal this PR uses 0.3% less memory at max heap, reads 0.6% fewer bytes, and writes 0.2% fewer bytes. It also executes fewer instructions and allocates less memory in total, by less than 0.1% each.

According to Hyperfine, this PR is "1.01 ± 0.01 times faster" than main when compiling Spidermonkey. On the other hand, Sightglass says main is 1.01x faster than this PR on the same benchmark by CPU cycles. In short, actual effects are too small to measure reliably.

By coincidence, the diff adds exactly as many lines as it removes, but a larger fraction of those lines are comments now.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 03 2022 at 20:42):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 03 2022 at 21:29):

jameysharp merged PR #5001.


Last updated: Nov 22 2024 at 17:03 UTC