jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
const rawSymbol = Symbol('pino-raw-res-ref')
const pinoResProto = Object.create({}, {
statusCode: {
enumerable: true,
writable: true,
value: 0
},
headers: {
enumerable: true,
writable: true,
value: ''
},
raw: {
enumerable: false,
get: function () {
return this[rawSymbol]
},
set: function (val) {
this[rawSymbol] = val
}
}
})
Object.defineProperty(pinoResProto, rawSymbol, {
writable: true,
value: {}
})
class PinoRes {
statusCode = 0;
headers = '';
#raw = {};
get raw () {return this.#raw};
set raw (v) {this.#raw = v};
}
const res = {
headersSent: true,
statusCode: 200,
getHeaders: () => [],
}
let lastFromProto = null
let lastFromClass = null
Ready to run.
Test | Ops/sec | |
---|---|---|
proto |
| ready |
class |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.