typeof vs in

Benchmark created on


Setup

var permits = {
	customer_view: 1,
    customer_create: 1,
    customer_update: 0,
    customer_delete: 0,
    product_view: 1,
    product_create: 0,
    product_update: 0,
    product_delete: 0,
    invoice_view: 1,
    invoice_create: 1,
    invoice_update: 0,
    invoice_delete: 0
};

Test runner

Ready to run.

Testing in
TestOps/sec
typeof
typeof permits.customer_delete
ready
in
'customer_delete' in permits
ready

Revisions

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