Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/binary/perf/ drwxr-xr-x | |
| Viewing file: Select action/file-type: var Seq = require('seq');
var Hash = require('hashish');
var Bin = require('binary');
var Buf = require('bufferlist/binary');
var BufferList = require('bufferlist');
var EventEmitter = require('events').EventEmitter;
function binary (buf, cb) {
Bin(buf)
.word32le('x')
.word16be('y')
.word16be('z')
.word32le('w')
.tap(cb)
;
};
function stream (buf, cb) {
var em = new EventEmitter;
Bin(em)
.word32le('x')
.word16be('y')
.word16be('z')
.word32le('w')
.tap(cb)
;
em.emit('data', buf);
};
function parse (buf, cb) {
cb(Bin.parse(buf)
.word32le('x')
.word16be('y')
.word16be('z')
.word32le('w')
.vars
);
};
function bufferlist (buf, cb) {
var blist = new BufferList;
blist.push(buf);
Buf(blist)
.getWord32le('x')
.getWord16be('y')
.getWord16be('z')
.getWord32le('w')
.tap(cb)
.end()
;
};
var buffers = [];
for (var i = 0; i < 200; i++) {
buffers.push(new Buffer(12));
}
console.log('small');
Seq(binary, stream, parse, bufferlist)
.seqEach(function (f) {
var t = this;
var t0 = Date.now();
Seq()
.extend(buffers)
.seqEach(function (buf) {
f(buf, this.bind(this, null));
})
.seq(function () {
var tf = Date.now();
console.log(' ' + f.name + ': ' + (tf - t0));
t(null);
})
;
})
.seq(function () {
this(null);
})
;
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.007 ]-- |