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

Revision 2 of this benchmark created 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.