sonic-boom
Advanced tools
Comparing version 1.0.0 to 1.0.1
16
bench.js
@@ -5,2 +5,3 @@ 'use strict' | ||
var SonicBoom = require('./') | ||
var Console = require('console').Console | ||
var fs = require('fs') | ||
@@ -10,6 +11,7 @@ | ||
var fd = fs.openSync('/dev/null', 'w') | ||
var sonic = new SonicBoom(fd) | ||
var sonic4k = new SonicBoom(fd, 4096) | ||
var sonicSync = new SonicBoom(fd, 0, true) | ||
var sonicSync4k = new SonicBoom(fd, 4096, true) | ||
var sonic = new SonicBoom({ fd }) | ||
var sonic4k = new SonicBoom({ fd, minLength: 4096 }) | ||
var sonicSync = new SonicBoom({ fd, sync: true }) | ||
var sonicSync4k = new SonicBoom({ fd, minLength: 4096, sync: true }) | ||
var dummyConsole = new Console(fs.createWriteStream('/dev/null')) | ||
@@ -60,2 +62,8 @@ var MAX = 10000 | ||
} | ||
}, | ||
function benchConsole (cb) { | ||
for (var i = 0; i < MAX; i++) { | ||
dummyConsole.log(str()) | ||
} | ||
setImmediate(cb) | ||
} | ||
@@ -62,0 +70,0 @@ ], 1000) |
{ | ||
"name": "sonic-boom", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Extremely fast utf8 only stream implementation", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,7 +10,8 @@ # sonic-boom ![Node.js CI](https://github.com/mcollina/sonic-boom/workflows/Node.js%20CI/badge.svg) | ||
``` | ||
benchSonic*1000: 2215.220ms | ||
benchSonicSync*1000: 8315.173ms | ||
benchSonic4k*1000: 2184.558ms | ||
benchSonicSync4k*1000: 1733.582ms | ||
benchCore*1000: 6513.752ms | ||
benchSonic*1000: 1916.904ms | ||
benchSonicSync*1000: 8605.265ms | ||
benchSonic4k*1000: 1965.231ms | ||
benchSonicSync4k*1000: 1588.224ms | ||
benchCore*1000: 5851.959ms | ||
benchConsole*1000: 7605.713ms | ||
``` | ||
@@ -17,0 +18,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31507
979
100