0.0.1 • Published 8 years ago

@snek/benchmark v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

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.