Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add benchmark for Module::deserialize (to compare with deserialize_file) #6420

Merged
merged 1 commit into from
May 22, 2023

Conversation

mrcnski
Copy link
Contributor

@mrcnski mrcnski commented May 21, 2023

PULL REQUEST

Overview

I was curious how Module::deserialize compared with deserialize_file. There was already a bench_deserialize_module so I expanded it to support deserialize.

Some results:

Benchmarking deserialize/deserialize/wasi.wasm
Benchmarking deserialize/deserialize/wasi.wasm: Warming up for 3.0000 s
Benchmarking deserialize/deserialize/wasi.wasm: Collecting 100 samples in estimated 5.4918 s (50k iterations)
Benchmarking deserialize/deserialize/wasi.wasm: Analyzing
deserialize/deserialize/wasi.wasm
                        time:   [107.44 µs 108.00 µs 108.56 µs]
Found 9 outliers among 100 measurements (9.00%)
  6 (6.00%) high mild
  3 (3.00%) high severe
Benchmarking deserialize/deserialize_file/wasi.wasm
Benchmarking deserialize/deserialize_file/wasi.wasm: Warming up for 3.0000 s
Benchmarking deserialize/deserialize_file/wasi.wasm: Collecting 100 samples in estimated 5.0337 s (56k iterations)
Benchmarking deserialize/deserialize_file/wasi.wasm: Analyzing
deserialize/deserialize_file/wasi.wasm
                        time:   [89.572 µs 89.705 µs 89.872 µs]
Found 14 outliers among 100 measurements (14.00%)
  9 (9.00%) high mild
  5 (5.00%) high severe

I was curious how `deserialize` compared with `deserialize_file`. There was
already a `bench_deserialize_module` so I expanded it to support `deserialize`.

Some results:

```
Benchmarking deserialize/deserialize/wasi.wasm
Benchmarking deserialize/deserialize/wasi.wasm: Warming up for 3.0000 s
Benchmarking deserialize/deserialize/wasi.wasm: Collecting 100 samples in estimated 5.4918 s (50k iterations)
Benchmarking deserialize/deserialize/wasi.wasm: Analyzing
deserialize/deserialize/wasi.wasm
                        time:   [107.44 µs 108.00 µs 108.56 µs]
Found 9 outliers among 100 measurements (9.00%)
  6 (6.00%) high mild
  3 (3.00%) high severe
Benchmarking deserialize/deserialize_file/wasi.wasm
Benchmarking deserialize/deserialize_file/wasi.wasm: Warming up for 3.0000 s
Benchmarking deserialize/deserialize_file/wasi.wasm: Collecting 100 samples in estimated 5.0337 s (56k iterations)
Benchmarking deserialize/deserialize_file/wasi.wasm: Analyzing
deserialize/deserialize_file/wasi.wasm
                        time:   [89.572 µs 89.705 µs 89.872 µs]
Found 14 outliers among 100 measurements (14.00%)
  9 (9.00%) high mild
  5 (5.00%) high severe
```
@mrcnski mrcnski requested a review from a team as a code owner May 21, 2023 15:38
@mrcnski mrcnski requested review from alexcrichton and removed request for a team May 21, 2023 15:38
@mrcnski mrcnski changed the title Add benchmark for deserialize (to compare with deserialize_file) Add benchmark for Module::deserialize (to compare with deserialize_file) May 21, 2023
Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alexcrichton alexcrichton added this pull request to the merge queue May 22, 2023
Merged via the queue into bytecodealliance:main with commit ba6c9fe May 22, 2023
@mrcnski mrcnski deleted the benchmark-deserialize branch May 22, 2023 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants