Stream: git-wasmtime

Topic: wasmtime / PR #1798 MachInst: a few memory enhancements


view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2020 at 16:48):

bnjbvr opened PR #1798 from memory-enhancements to master:

This series of commits (which will have to land with a version bump of regalloc.rs to accommodate the API changes) reduces the number of memory allocations during compilation.

All in all, with all the changes from https://github.com/bytecodealliance/regalloc.rs/pull/71 too, the results are the following:

benchmark bytes allocs block allocs inst count
big.clif before 389M 458K 4966M
big.clif after 317M 424K 4798M
medium.clif before 17.9M 33K 173M
medium.clif after 14.8M 22K 155M
regex-rs.wasm before 700M 1.942M 5030M
regex-rs.wasm after 586M 1.619M 4582M

It's hard to measure the wallclock effect, because my machine is quite noisy (despite setting CPU governance to perf, etc.) and the benchmarks run for really short. Instruction counts are pretty stable, though, and for a final measure I performed them with Cachegrind, just to be sure about those.

cc @julian-seward1

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2020 at 16:48):

bnjbvr requested cfallin for a review on PR #1798.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2020 at 16:57):

cfallin submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2020 at 16:57):

cfallin submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 01 2020 at 16:57):

cfallin created PR Review Comment:

Pre-existing, but I just realized that we don't document this side-effect of emit_call on the ABICall trait. Perhaps add to the doc comment (in the trait def) to note that emit_call() should only be called once, because it is allowed to re-use parts of the ABICall object in emitting instructions?

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2020 at 13:30):

bnjbvr updated PR #1798 from memory-enhancements to master:

This series of commits (which will have to land with a version bump of regalloc.rs to accommodate the API changes) reduces the number of memory allocations during compilation.

All in all, with all the changes from https://github.com/bytecodealliance/regalloc.rs/pull/71 too, the results are the following:

benchmark bytes allocs block allocs inst count
big.clif before 389M 458K 4966M
big.clif after 317M 424K 4798M
medium.clif before 17.9M 33K 173M
medium.clif after 14.8M 22K 155M
regex-rs.wasm before 700M 1.942M 5030M
regex-rs.wasm after 586M 1.619M 4582M

It's hard to measure the wallclock effect, because my machine is quite noisy (despite setting CPU governance to perf, etc.) and the benchmarks run for really short. Instruction counts are pretty stable, though, and for a final measure I performed them with Cachegrind, just to be sure about those.

cc @julian-seward1

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2020 at 13:32):

bnjbvr updated PR #1798 from memory-enhancements to master:

This series of commits (which will have to land with a version bump of regalloc.rs to accommodate the API changes) reduces the number of memory allocations during compilation.

All in all, with all the changes from https://github.com/bytecodealliance/regalloc.rs/pull/71 too, the results are the following:

benchmark bytes allocs block allocs inst count
big.clif before 389M 458K 4966M
big.clif after 317M 424K 4798M
medium.clif before 17.9M 33K 173M
medium.clif after 14.8M 22K 155M
regex-rs.wasm before 700M 1.942M 5030M
regex-rs.wasm after 586M 1.619M 4582M

It's hard to measure the wallclock effect, because my machine is quite noisy (despite setting CPU governance to perf, etc.) and the benchmarks run for really short. Instruction counts are pretty stable, though, and for a final measure I performed them with Cachegrind, just to be sure about those.

cc @julian-seward1

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2020 at 13:32):

bnjbvr submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2020 at 13:32):

bnjbvr created PR Review Comment:

Good point, added!

view this post on Zulip Wasmtime GitHub notifications bot (Jun 02 2020 at 14:29):

bnjbvr merged PR #1798.


Last updated: Dec 23 2024 at 12:05 UTC