File: crc32-1kb.coffee

package info (click to toggle)
node-crc 3.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 272 kB
  • ctags: 13
  • sloc: makefile: 10; sh: 2
file content (16 lines) | stat: -rw-r--r-- 331 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
benchmark = require './benchmark'

global.string = benchmark.getBuffer(1024).toString()

benchmark.add
  minSamples : 100
  name       : 'crc/crc32 1kb'
  fn         : 'var val = crc.crc32(string)'

benchmark.add
  minSamples : 100
  name       : 'buffer-crc32 1kb'
  fn         : 'var val = bufferCRC32(string)'

benchmark.run()