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
<script>
let p5_a, p5_b;
let fetchVersions = async () => {
await fetch('https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.7.0/p5.js')
.then(r => r.text())
.then(contents => eval(contents))
p5_a = p5
await fetch('https://raw.githubusercontent.com/wong-justin/p5.js/shader-filters-build/lib/p5.js')
.then(r => r.text())
.then(contents => eval(contents))
p5_b = p5
}
let sleep = (millis) => {
let e = new Date().getTime() + (millis)
while (new Date().getTime() <= e) {}
}
// SETUP
fetchVersions()
// force an ugly wait since there's no way to fetch().then(start_tests)
// aka can't await fetch to finish, so just hope fetch finishes in time
// sorry for blocking UI thread
sleep(7000)
console.log(p5_a, p5_b)
let sketch = (p) => {
p.setup = () => {
p.createCanvas(100, 100, p.WEBGL)
}
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
p5 v1.7.0 |
| ready |
p5 v1.7.0-shader-filters |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.