check instance

Benchmark created on


Setup

var __ = Symbol()
class A {
	[__] = true
}
class B {}

Test runner

Ready to run.

Testing in
TestOps/sec
instanceof
const b = new B();
const c = b instanceof A;
ready
symbol
const b = new B();
const c = !!b[__];
ready

Revisions

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