@snek/benchmark

0.0.1 • Public • Published

npm David

NPM

benchmark Version Badge

This package is still very experimental

const Benchmark = require('@snek/benchmark');

const s = new Benchmark.Suite();

s.add('RegExp#test', () => { /o/.test('Hello, World!'); });
s.add('String#indexOf', () => { !!'Hello, World'.indexOf('o'); });
s.add('String#includes', () => { 'Hello, World!'.includes('o'); });

s.on('cycle', console.log);

s.run();

Also available through unpkg and jsdelivr.

Readme

Keywords

none

Package Sidebar

Install

npm i @snek/benchmark

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • snek