Implement simple benchmarks for instantiation.

This adds benchmarks around module instantiation using criterion.

Both the default (i.e. on-demand) and pooling allocators are tested
sequentially and in parallel using a thread pool.

Instantiation is tested with an empty module, a module with a single page
linear memory, a larger linear memory with a data initializer, and a "hello
world" Rust WASI program.
This commit is contained in:
Peter Huene
2021-05-11 01:00:34 -07:00
parent fa1faf5d22
commit 1b8efa7bbd
10 changed files with 197 additions and 5 deletions

View File

@@ -0,0 +1,5 @@
(module
(memory 17)
(func (export "_start"))
(data (i32.const 0) "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789")
)