Skip to content
Permalink
Browse files

Merge pull request #4 from marcomontalbano/rename-project

Rename project
  • Loading branch information...
marcomontalbano committed Feb 27, 2019
2 parents 8f20202 + 29846f3 commit e66db2ceb54f51712cfb4590a62d0de9cebff33a
Showing with 310 additions and 861 deletions.
  1. +7 −7 Cargo.lock
  2. +2 −2 Cargo.toml
  3. +7 −7 README.md
  4. +278 −828 package-lock.json
  5. +11 −12 package.json
  6. +1 −1 public/index.html
  7. +4 −4 src-js/web/rs.worker.js

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -1,10 +1,10 @@
[package]
name = "wa-vs-js-benchmark"
name = "wasm-vs-js-benchmark"
version = "0.1.0"
authors = ["Marco Montalbano <marcomontalbano.work@gmail.com>"]
description = "A benchmark for WebAssembly and Javascript."
license = "MIT"
repository = "https://github.com/marcomontalbano/wa-vs-js-benchmark"
repository = "https://github.com/marcomontalbano/wasm-vs-js-benchmark"
edition = "2018"

[lib]
@@ -1,6 +1,6 @@
# WebAssembly vs Javascript

[![Build Status](https://travis-ci.org/marcomontalbano/wa-vs-js-benchmark.svg?branch=master)](https://travis-ci.org/marcomontalbano/wa-vs-js-benchmark)
[![Build Status](https://travis-ci.org/marcomontalbano/wasm-vs-js-benchmark.svg?branch=master)](https://travis-ci.org/marcomontalbano/wasm-vs-js-benchmark)

*A comparison between WebAssembly and Javascript made for ~~studying~~ fun.*

@@ -86,7 +86,7 @@ $ cargo build --release
Now that we have built our code, we can run it:

```sh
$ ./target/release/wa-vs-js-benchmark primes-get_primes 11
$ ./target/release/wasm-vs-js-benchmark primes-get_primes 11
```

We can also use `cargo run` to compile and then run it, all in one step:
@@ -150,19 +150,19 @@ These benchmarks are recorded on a MacBook Pro (15-inch, 2016) having these spec
$ cargo build --release
$ hyperfine --warmup 3 --export-markdown BENCHMARK.md \
'./target/release/wa-vs-js-benchmark primes-get_primes 100000' \
'./target/release/wa-vs-js-benchmark matrix-multiply 500 500'
'./target/release/wasm-vs-js-benchmark primes-get_primes 100000' \
'./target/release/wasm-vs-js-benchmark matrix-multiply 500 500'
```

| Command | Mean [s] | Min…Max [s] |
|:---|---:|---:|
| `./target/release/wa-vs-js-benchmark primes-get_primes 100000` | 1.198 ± 0.006 | 1.191…1.212 |
| `./target/release/wa-vs-js-benchmark matrix-multiply 500 500` | 0.420 ± 0.006 | 0.411…0.432 |
| `./target/release/wasm-vs-js-benchmark primes-get_primes 100000` | 1.211 ± 0.018 | 1.196…1.255 |
| `./target/release/wasm-vs-js-benchmark matrix-multiply 500 500` | 0.435 ± 0.016 | 0.417…0.469 |


### WebAssembly vs Javascript

https://marcomontalbano.github.io/wa-vs-js-benchmark
https://marcomontalbano.github.io/wasm-vs-js-benchmark


## Useful Links
Oops, something went wrong.

0 comments on commit e66db2c

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.