testperf

2.0.8 • Public • Published

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'.

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i testperf

    Weekly Downloads

    3

    Version

    2.0.8

    License

    GPL-2.0+

    Last publish

    Collaborators

    • ryanpcmcquen