Stream: git-wasmtime

Topic: wasmtime / issue #6655 Add benchmarks


view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 20:55):

PROMETHIA-27 opened issue #6655:

Feature

I'd like to start contributing benchmarks to cranelift-codegen to allow tracking the effectiveness of optimizations over time (and maybe make comparisons to presumably-mostly-optimal equivalent rust code).

Benefit

This would encourage the development of optimizations by allowing contributors to easily measure the compile time and code generation impacts of any optimizations.

Implementation

I plan to add benchmarks alongside the sole existing one, writing relevant CLIF files alongside them. Then, in the benchmarks, use cranelift-codegen and cranelift-jit to compile and run the code, respectively.

Alternatives

A slightly higher-level DSL to write the examples in might be beneficial to how quickly they can be written. I considered writing a simple lisp that lowers to CLIF but with name resolution.

The CLIF could be embedded as static strings, but with include_str! that seems messier than separate files.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 27 2023 at 21:06):

bjorn3 commented on issue #6655:

Benchmarking is generally done using https://github.com/bytecodealliance/sightglass which benchmarks compilation and execution of a couple of wasm modules using wasmtime.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 28 2023 at 00:57):

PROMETHIA-27 commented on issue #6655:

Ah, that does seem much better than what I was proposing. Seems like almost no one knows it exists.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 28 2023 at 00:57):

PROMETHIA-27 closed issue #6655:

Feature

I'd like to start contributing benchmarks to cranelift-codegen to allow tracking the effectiveness of optimizations over time (and maybe make comparisons to presumably-mostly-optimal equivalent rust code).

Benefit

This would encourage the development of optimizations by allowing contributors to easily measure the compile time and code generation impacts of any optimizations.

Implementation

I plan to add benchmarks alongside the sole existing one, writing relevant CLIF files alongside them. Then, in the benchmarks, use cranelift-codegen and cranelift-jit to compile and run the code, respectively.

Alternatives

A slightly higher-level DSL to write the examples in might be beneficial to how quickly they can be written. I considered writing a simple lisp that lowers to CLIF but with name resolution.

The CLIF could be embedded as static strings, but with include_str! that seems messier than separate files.


Last updated: Dec 23 2024 at 12:05 UTC