Releases: d4rkr00t/percentile
Releases · d4rkr00t/percentile
v1.6.0
What's Changed
- build: migrate to github actions by @d4rkr00t in #104
- feat: include types in package.json by @SKalt in #112
- build(deps): bump path-parse from 1.0.6 to 1.0.7 by @dependabot in #110
New Contributors
Full Changelog: v1.5.0...v1.6.0
v1.5.0
v1.4.0
v1.3.0
Features
Support an array of percentiles (179a027), closes #101
Add support for calcualting and array of percentiles in 1 pass, example:
const percentile = require("percentile");
const result = percentile(
[70, 80, 90], // calculates 70p, 80p and 90p in one pass
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
);
console.log(result); // [7, 8, 9]
It adds a little bit of overhead because, now percentile needs to convert a percentile argument to an array and apply validation and calculation to this array of percentiles, but overall performance is still in a ball park of original implementation:
Small Array – 10 items [old] x 3,024,685 ops/sec ±0.65% (94 runs sampled)
Small Array – 10 items [new] x 2,941,058 ops/sec ±1.04% (95 runs sampled)
Fastest is Small Array – 10 items [old]
Big array 10k values [old] x 5,482 ops/sec ±0.58% (92 runs sampled)
Big array 10k values [new] x 5,381 ops/sec ±0.69% (91 runs sampled)
Fastest is Big array 10k values [old]
Big array 100k values [old] x 395 ops/sec ±1.00% (91 runs sampled)
Big array 100k values [new] x 406 ops/sec ±0.93% (88 runs sampled)
Fastest is Big array 100k values [new]