Add Go and Rust algorithm benchmarks
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
cd "$(dirname "$0")"
|
||||
out=../.build/wasm-fib
|
||||
mkdir -p "$out"
|
||||
GOOS=js GOARCH=wasm go build -trimpath -ldflags='-s -w' -o "$out/go.wasm" main.go
|
||||
rustc --edition 2021 --crate-type cdylib --target wasm32-unknown-unknown \
|
||||
-C opt-level=3 -C panic=abort -C strip=symbols -o "$out/rust.wasm" fib.rs
|
||||
node bench.cjs "$out" "$(go env GOROOT)/lib/wasm/wasm_exec.js"
|
||||
Reference in New Issue
Block a user