Object create vs factory

Benchmark created on


Setup

const buffer = new Float16Array()
function divideBuffer() {
	return 1.0 / buffer[0]
}
function divide(num) {
	return 1.0 / num
}

Test runner

Ready to run.

Testing in
TestOps/sec
int
buffer[0] = 42.2
divideBuffer()
ready
float
divide(42.2)
ready

Revisions

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