Code files

This commit is contained in:
Akhil
2017-07-31 11:33:31 +05:30
parent 073a63ebdd
commit b9ae409ec0
801 changed files with 17535 additions and 0 deletions
@@ -0,0 +1,28 @@
'use strict'
const benchmark = require('benchmark')
const noCollection = require('./no-collections')
const suite = new benchmark.Suite()
const numbers = []
for (let i = 0; i < 1000; i++) {
numbers.push(Math.random() * i)
}
suite.add('no-collections', function () {
noCollection(12, numbers)
})
suite.on('complete', print)
suite.run()
function print () {
for (var i = 0; i < this.length; i++) {
console.log(this[i].toString())
}
console.log('Fastest is', this.filter('fastest').map('name')[0])
}