ifcap vs max

Benchmark created on


Setup

var n = Math.random * 100;

Test runner

Ready to run.

Testing in
TestOps/sec
ifcap
if(n > 50) {
  n = 50;
}
ready
max
n = Math.max(n, 50);
ready

Revisions

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