binSwapVars (v11)

Revision 11 of this benchmark created by hgoebl on


Description

remove 'delete c' since it doesn't work with 'var'

Setup

var a = ~~(Math.random()*100000);
    var b = ~~(Math.random()*100000);

Test runner

Ready to run.

Testing in
TestOps/sec
binary
a^=b; b^=a; a^=b;
ready
temp variable
var c = a;
a = b;
b = c;
 
ready
js 1.7
[a,b]=[b,a]
ready

Revisions

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