Skip to content

Benchmarks running Rust code from node (comparing native & WebAssembly)

Notifications You must be signed in to change notification settings

fbecart/rust-node-benchmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Node benchmarks

Prerequisites

Usage

npm install
npm run build-subjects
npm run bench

Functions under benchmark

sum

Sums 1 and 2.

The goal of this benchmark is to measure the cost of calling Rust code from JS.

sha1

Computes the hash of a short string.

The goal of this benchmark is to compare a JS implementation to a Rust implementation of the same algorithm.

The js implementation is in pure JS. It probably hasn't been subject to as much optimization as the Rust version. It definitely isn't as fast as the what the crypto node module would provide, but crypto uses itself native binaries.

fibonacci

Naive procedural implementation of the fibonacci suite.

parse TOML

Parses a TOML string to extract the value of a specific field.

About

Benchmarks running Rust code from node (comparing native & WebAssembly)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published