add numbers

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
loop
var j = 0;

for(var i=1;i<=100;i++){
j+=i;
}
ready
recursion
var add = function(i){
if(i == 1){ return 1; }
return i+add(i-1);
}

var j = add(100);
ready

Revisions

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