Expression truthiness

Benchmark created by sexyprout on


Description

Related: http://jsperf.com/expression-falseness

Preparation HTML

<script>
  var a = true
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
a
Boolean(a)
ready
!!a
Boolean(!!a)
ready
a == true
Boolean(a == true)
ready
a === true
Boolean(a === true)
ready

Revisions

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

  • Revision 1: published by sexyprout on