ceil

Benchmark created on


Preparation HTML

<script>
  var x = 10.655464;
  var y = 10;
  var z = -15.3423;
  var w = -16;
  
  function ravan(x) {
        return (x>>0)+(x>0&(x!=(x>>0)));
  }
  
  function roger(x){return /\./.test(x)&&x>0?parseInt(x)+1:parseInt(x);}
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
ravan
ravan(x);
ravan(y);
ravan(z);
ravan(w);
ready
roger
roger(x);
roger(y);
roger(z);
roger(w);
ready

Revisions

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