Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "rapid-crc", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "", | ||
@@ -22,5 +22,4 @@ "main": "index.js", | ||
"node-gyp": "^5.0.3", | ||
"sse4_crc32": "^5.3.0", | ||
"turbo-crc32": "^1.0.1" | ||
} | ||
} |
@@ -8,26 +8,24 @@ const Benchmark = require('benchmark') | ||
const turbo = require('turbo-crc32/crc32c') | ||
const sse4 = require('sse4_crc32') | ||
describe('crc32c', () => { | ||
beforeAll(() => { | ||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000; | ||
}) | ||
beforeAll(() => { | ||
jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000; | ||
}) | ||
it('is the fastest', done => { | ||
const input = createInput(100); | ||
(new Benchmark.Suite) | ||
.add('rapid', () => crc32c(input)) | ||
.add('rapidjs', () => crc32cjs(input)) | ||
.add('turbo', () => turbo(input)) | ||
.add('sse4', () => sse4.calculate(input)) | ||
.on('cycle', event => { | ||
console.log(String(event.target)) | ||
}) | ||
.on('complete', function () { | ||
expect(this.filter('fastest').map('name')[0]).toEqual('rapid') | ||
done() | ||
}) | ||
.run({ 'async': true }) | ||
}) | ||
it('is the fastest', done => { | ||
const input = createInput(100); | ||
(new Benchmark.Suite) | ||
.add('rapid', () => crc32c(input)) | ||
.add('rapidjs', () => crc32cjs(input)) | ||
.add('turbo', () => turbo(input)) | ||
.on('cycle', event => { | ||
console.log(String(event.target)) | ||
}) | ||
.on('complete', function () { | ||
expect(this.filter('fastest').map('name')[0]).toEqual('rapid') | ||
done() | ||
}) | ||
.run({ 'async': true }) | ||
}) | ||
}) | ||
[![Build Status](https://travis-ci.org/dolegi/rapid-crc.svg?branch=master)](https://travis-ci.org/dolegi/rapid-crc) | ||
# Rapid CRC | ||
Aims to be the fastest crc implemenation on npm | ||
Aims to be the fastest crc32 and crc32c implemenations on npm | ||
@@ -10,2 +10,6 @@ ### Install | ||
### Support CRC | ||
- crc32 | ||
- crc32c | ||
### References | ||
@@ -12,0 +16,0 @@ - https://github.com/madler/zlib/blob/master/crc32.c |
@@ -6,7 +6,4 @@ { | ||
], | ||
"helpers": [ | ||
"helpers/**/*.js" | ||
], | ||
"stopSpecOnExpectationFailure": false, | ||
"random": true | ||
} |
Sorry, the diff of this file is not supported yet
8
19
21890
18
389