A race (v3)

Revision 3 of this benchmark created on


Preparation HTML

<div id="tarif"></div>
<div id="stevie"></div>
<div id="joe"></div>

Setup

const tEl = document.querySelector('#tarif');
const sEl = document.querySelector('#stevie');
const jEl = document.querySelector('#joe');

Test runner

Ready to run.

Testing in
TestOps/sec
Run Tarif Run
let count = 0;

while (count < 1000) {
	count += 11;	
}
ready
Run Stevie Run
let count = 0;

while (count < 1000) {
	count += 10;	
}
ready
Run Joe Run
let count = 0;

while (count < 1000) {
	const joeCanCatchInts = Math.random() * 100000 < 1;
	if (!joeCanCatchInts) {
		count += 500;
	}
	count += 0.01;	
}
ready

Revisions

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