Double-bang (!!) performance vs. traditional conditional statements (v3)

Revision 3 of this benchmark created by TeMc on


Description

A question posted here: http://forum.jquery.com/topic/double-bang-performance-vs-traditional-conditional-statements

Preparation HTML

<script>
  var a = "";
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
double-bang way
var b = !! a;
ready
traditional way
var b = a === '';
ready

Revisions

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