ab

Benchmark created on


Setup

let _a = 59;
let _log = [361,360,360,360];
let _b = 0;

Test runner

Ready to run.

Testing in
TestOps/sec
a
if (_a >= 59 && _a <= 61) {
  _b = 60;
} else if (_a >= 119 && _a <= 121) {
  _b = 120;
} else if (_a >= 239 && _a <= 241) {
  _b = 240;
} else if (_a >= 359 && _a <= 361) {
  _b = 360;
} else {
  _b = 0;
}
ready
b
_b = Math.round((_log[0]+_log[1]+_log[2]+_log[3])/4);
ready

Revisions

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