Skip to content
A zero-dependency speed test for node or native browser JavaScript.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.flowconfig
.gitignore
.prettierrc.json
LICENSE.md
README.md
index.js
package.json
test.js

README.md

testperf

An easy speed test for JavaScript.

Takes 2 arguments (name, function), and then any additional arguments are passed to the function being tested.

Example:

const flatMap = require("flatmap-fast")

testPerf("flatMapFast", flatMap, ["Hi", "World"], word => word.split(""))

// => flatMapFast took: 622.593672 milliseconds.

As of v2.0.3, node and native browser JavaScript are supported, using either performance.now() or process.hrtime(). process.hrtime() is formatted to match performance.now()'s output'.

You can’t perform that action at this time.