Faster! (v2)

Revision 2 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Coercion
const x = function(obj) {
	return obj != null
}

x({})
x({hello: 'world'})
x({
	hello: 'world',
	next: {
		hello: 'world',
		run: 3
	}
})
ready
Boolean
const y = function (obj) {
	return Boolean(obj)
}

y({})
y({hello: 'world'})
y({
	hello: 'world',
	next: {
		hello: 'world',
		run: 3
	}
})
ready
Full check
const z = function(obj) {
	return obj !== undefined && obj !== null
}

z({})
z({hello: 'world'})
z({
	hello: 'world',
	next: {
		hello: 'world',
		run: 3
	}
})
ready

Revisions

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