Test functions vs no functions

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Lots of functions
const RANGE = [1,2,3,4,5];
const c = () => {
	const index = Math.floor(Math.random()*5);
	const retval = RANGE[index];
	return retval;
}
const foobar = c()
ready
Fewer functions
const RANGE = [1,2,3,4,5];
const foobar = RANGE[Math.floor(Math.random()*5)];
ready

Revisions

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