Comparing p5js builds

Benchmark created on


Preparation HTML

<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>

Setup



Test runner

Ready to run.

Testing in
TestOps/sec
p5 v1.7.0
new p5_a(sketch)
ready
p5 v1.7.0-shader-filters
new p5_b(sketch)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.