inherent boolean

Benchmark created by Sean on


Preparation HTML

<section id="element"></section><script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
inherent
var test = true;

if (test) {
$('#element').append('0 ');
}
ready
stated
var test = true;

if (true === test) {
$('#element').append('0 ');
}
ready
stated (bad)
var test = true;

if (test === true) {
$('#element').append('0 ');
}
ready

Revisions

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