Stream: git-wasmtime

Topic: wasmtime / PR #5391 Optimizations to egraph framework


view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 06:46):

cfallin requested elliottt for a review on PR #5391.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 06:46):

cfallin opened PR #5391 from egraph-opts to main:

It turns out that there was a decent amount of low-hanging fruit:

With these changes, bz2.wasm sees a ~1% speedup, and spidermonkey.wasm with a fib.js input sees a ~16% speedup (measured over 5 runs; CPU frequency scaling disabled, pinned to 1 core), with methodology:

$ time taskset 1 target/release/wasmtime run --allow-precompiled --dir=. ./spidermonkey.base.cwasm ./fib.js
1346269
taskset 1 target/release/wasmtime run --allow-precompiled --dir=.  ./fib.js  2.14s user 0.01s system 99% cpu 2.148 total
$ time taskset 1 target/release/wasmtime run --allow-precompiled --dir=. ./spidermonkey.egraphs.cwasm ./fib.js
1346269
taskset 1 target/release/wasmtime run --allow-precompiled --dir=.  ./fib.js  1.78s user 0.01s system 99% cpu 1.788 total

My basic strategy here was to stare at disassemblies of the hottest basic blocks when running the above, and pick out what looked like suboptimal code. I suspect doing the same for other benchmarks would possibly yield more benefits.

<!--

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 (Dec 07 2022 at 06:46):

cfallin requested jameysharp for a review on PR #5391.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 06:46):

cfallin requested fitzgen for a review on PR #5391.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 06:53):

cfallin updated PR #5391 from egraph-opts to main.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 07:02):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 07:02):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 07:02):

jameysharp created PR review comment:

There's already an intcc_inverse in prelude_lower.isle, implemented in machinst/isle.rs. Can you move that to the prelude instead of introducing a new copy? Maybe move the other intcc and floatcc constructors at the same time, just so they're all in one place.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 17:01):

cfallin updated PR #5391 from egraph-opts to main.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 17:02):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 17:02):

cfallin created PR review comment:

Ah, I hadn't seen that; updated, thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 21:22):

jameysharp submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 07 2022 at 21:23):

cfallin merged PR #5391.


Last updated: Nov 22 2024 at 16:03 UTC