length vs. minus

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
length
var a = [1, 2, 3, 4, 5];

if (a.length > 4) {
 a[0] = 42;
}
ready
minus
var a = [1, 2, 3, 4, 5];

if (a.length - 4) {
 a[0] = 42;
}
ready

Revisions

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