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
String.prototype.UInt16_a = function(n) {
return this.charCodeAt(n) + 256 * this.charCodeAt(n + 1);
};
String.prototype.UInt16_b = function(n) {
return this.charCodeAt(n) + (this.charCodeAt(n + 1) << 8);
};
var UInt16_c = function(s, n) {
return s.charCodeAt(n) + 256 * s.charCodeAt(n + 1);
};
var UInt16_d = function(s, n) {
return s.charCodeAt(n) + (s.charCodeAt(n + 1) << 8);
};
var input = "Ax";
var output = 0;
var n = 0;
Ready to run.
Test | Ops/sec | |
---|---|---|
Prototype - mul |
| ready |
Prototype - shift |
| ready |
Function - mul |
| ready |
Function - shift |
| ready |
Inline - mul |
| ready |
Inline - shift |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.