YES/NO vs. true/false

Benchmark created on


Preparation HTML

<script>
 var YES = true;
 var NO = true;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
YES/NO
var o = {},
    idx = 0;
while (idx < 1000000) {
 o.a = YES;
 o.b = NO;
 idx++;
}
ready
true/false
var o = {},
    idx = 0;
while (idx < 1000000) {
 o.a = true;
 o.b = false;
 idx++;
}
ready

Revisions

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