Skip to content

Latest commit

 

History

History
41 lines (25 loc) · 985 Bytes

README.md

File metadata and controls

41 lines (25 loc) · 985 Bytes

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.