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
A comparison between the performance of μMath's raw functions, convenience methods with self-output, and convenience functions without existing output arrays.
<!-- Need to use another script to import modules since the default environment does not support them. -->
<script type="module">
import Matrix4, { createMatrix4Like, identity, multiply, scale, translate} from "https://esm.sh/@lakuna/umath/Matrix4";
import { createVector3Like, fromValues } from "https://esm.sh/@lakuna/umath/Vector3";
import { create as glCreate, multiply as glMultiply, scale as glScale, translate as glTranslate } from "https://esm.sh/gl-matrix/mat4";
// Add imported values to `globalThis` so that they can be accessed outside of this script.
globalThis.Matrix4 = Matrix4;
globalThis.createMatrix4Like = createMatrix4Like;
globalThis.identity = identity;
globalThis.multiply = multiply;
globalThis.scale = scale;
globalThis.translate = translate;
globalThis.createVector3Like = createVector3Like;
globalThis.fromValues = fromValues;
globalThis.glCreate = glCreate;
globalThis.glMultiply = glMultiply;
globalThis.glMultiply = glMultiply;
globalThis.glScale= glScale;
globalThis.glTranslate= glTranslate;
</script>
const half = fromValues(0.5, 0.5, 0.5, createVector3Like());
const other = createMatrix4Like();
Ready to run.
Test | Ops/sec | |
---|---|---|
Raw Functions |
| ready |
Convenience Methods with Self-Output |
| ready |
Convenience Methods with New Output |
| ready |
glMatrix |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.