1.0.5 • Published 4 years ago

funcmeasure v1.0.5

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

Installation

npm install --save funcmeasure

Usage

import { measure } from 'funcmeasure';

function f1() { 1 + 1 }
function f2() {
    var i = 5

    for (let _ = 0; _ < 100; _ ++) {
        i = Math.pow(i, 10)
    }
}

let measurements = measure([f1, f2], 10000, true)

Result

Tested 2 functions, ran 10000 times each.

--------------------------------------------------------------
| Function | Total Duration |   Avg Duration |         Score |
--------------------------------------------------------------
|       f1 |    0.000309193 |        3.09e-8 |       fastest |
|       f2 |    0.008580814 |       8.581e-7 | 27.75x slower |
--------------------------------------------------------------
1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago