const benchmark = require('benchmark')
const cbindings = require('../bindings')
const cpurejs = require('../js')
const obindings = require('sha3')
const opurejs = require('js-sha3')

new benchmark.Suite()
  .add('Bindings (current)', () => cbindings('keccak256').digest('hex'))
  .add('Pure JS (current)', () => cpurejs('keccak256').digest('hex'))
  .add('Bindings (sha3)', () => obindings.SHA3Hash(256).digest('hex'))
  .add('Pure JS (js-sha3)', () => opurejs.keccak_256(''))
  .on('cycle', (event) => {
    console.log(String(event.target))
  })
  .on('complete', function () {
    console.log('Fastest is ' + this.filter('fastest').map('name'))
  })
  .run()

@@ -196,18 +196,33 @@
 k.Suite(
+'Buffer 0bytes'
 )%0A
-
   .add('
@@ -608,24 +608,681 @@
 log(
-'Fastest is ' + 
+%60$%7Bthis.name%7D: fastest is $%7Bthis.filter('fastest').map('name')%7D%60)%0A  %7D)%0A  .run()%0A%0Aconst buffer10mib = require('crypto').randomBytes(10 * 1024 * 1024)%0Anew benchmark.Suite('Buffer 10MiB')%0A  .add('Bindings (current)', () =%3E cbindings('keccak256').update(buffer10mib).digest('hex'))%0A  .add('Pure JS (current)', () =%3E cpurejs('keccak256').update(buffer10mib).digest('hex'))%0A  .add('Bindings (sha3)', () =%3E obindings.SHA3Hash(256).update(buffer10mib).digest('hex'))%0A  .add('Pure JS (js-sha3)', () =%3E opurejs.keccak_256(buffer10mib))%0A  .on('cycle', (event) =%3E %7B%0A    console.log(String(event.target))%0A  %7D)%0A  .on('complete', function () %7B%0A    console.log(%60$%7Bthis.name%7D: fastest is $%7B
 this
@@ -1311,16 +1311,18 @@
 ('name')
+%7D%60
 )%0A  %7D)%0A 

Add benchmark 10MiB