An open API service indexing awesome lists of open source software.

https://github.com/zhuravlevma/node-wasm

Test calculations for matrix and fibonacci. NodeJS with Rust(WASM) vs NodeJS vanilla
https://github.com/zhuravlevma/node-wasm

nodejs wasm wasm-bindgen wasm-pack webassembly

Last synced: 3 months ago
JSON representation

Test calculations for matrix and fibonacci. NodeJS with Rust(WASM) vs NodeJS vanilla

Awesome Lists containing this project

README

          

NodeJS & WASM

A template for kick starting a Rust and WebAssembly project using wasm-pack.

## About

## Test results

### Average time of calculations for Matrix:
#### WASM: 1ms ⚡
#### JS vanilla: 95.82ms
### Average time of calculations for Fibonacci:
#### WASM: 92ms ⚡
#### JS vanilla: 173.71428571428572ms

## 🚴 Usage

```
npm start
```

### 🛠️ Build with `wasm-pack build`

```
wasm-pack build
```

## 🔋 Batteries Included

* [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) for communicating
between WebAssembly and JavaScript.
* [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook)
for logging panic messages to the developer console.
* [`wee_alloc`](https://github.com/rustwasm/wee_alloc), an allocator optimized
for small code size.