-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from liqueurdetoile/dev1.0.0
feat: Release 1.0.0
- Loading branch information
Showing
45 changed files
with
39,890 additions
and
13,495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const webpack = require('webpack'); | ||
const path = require('path'); | ||
const merge = require('webpack-merge'); | ||
const base = require('./base.js'); | ||
|
||
module.exports = merge(base, { | ||
devtool: false, | ||
performance: { | ||
hints: false // Only here to disable large assets message when doing benchmark | ||
}, | ||
mode: 'production', | ||
watch: false | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import blobCompare from '@'; | ||
import blobs from '../fixtures'; | ||
|
||
let dataset = new Map(); | ||
|
||
dataset.set('empty', blobs.empty()); | ||
dataset.set('small', blobs.create([['a', Math.pow(2, 16)]])); | ||
dataset.set('medium', blobs.get('mid.jpg')); | ||
|
||
for (let [name, blob] of dataset) { | ||
suite(`Converters benchmark with ${name} blob (${blob.size} bytes)`, () => { | ||
benchmark(`Binary String (worker)`, async () => { | ||
return await blobCompare.toBinaryString(blob); | ||
}, {maxTime: 1}); | ||
|
||
benchmark(`ArrayBuffer (worker)`, async () => { | ||
return await blobCompare.toArrayBuffer(blob); | ||
}, {maxTime: 1}); | ||
|
||
benchmark(`Binary String (main)`, async () => { | ||
return await blobCompare.toBinaryString(blob, false, false); | ||
}, {maxTime: 1}); | ||
|
||
benchmark(`ArrayBuffer (main)`, async () => { | ||
return await blobCompare.toArrayBuffer(blob, false, false); | ||
}, {maxTime: 1}); | ||
}, { | ||
onComplete() { | ||
dataset.delete(name); | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import blobCompare from '@'; | ||
import blobs from '../fixtures'; | ||
|
||
let dataset = new Map(); | ||
|
||
dataset.set('empty', blobs.buffer(0)); | ||
dataset.set('small', blobs.buffer(Math.pow(2, 16))); | ||
dataset.set('medium', blobs.getBuffer('mid.jpg')); | ||
dataset.set('big', blobs.buffer(Math.pow(2, 26))); | ||
// dataset.set('huge', blobs.buffer(10 * Math.pow(2, 26))); | ||
|
||
for (let [name, buf] of dataset) { | ||
suite(`Comparator benchmark with ${name} ArrayBuffer (${buf.byteLength} bytes)`, () => { | ||
benchmark(`Worker`, async () => { | ||
const vs = buf.slice(0); | ||
|
||
return await blobCompare.compareBuffers(buf, vs); | ||
}, {maxTime: 1}); | ||
|
||
benchmark(`Main thread`, async () => { | ||
const vs = buf.slice(0); | ||
|
||
return await blobCompare.compareBuffers(buf, vs, false); | ||
}, {maxTime: 1}); | ||
}, { | ||
onComplete() { | ||
dataset.delete(name); | ||
} | ||
}); | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.