Binary vs Ternary

Edit on GitHub

Setup

Tests

  • Binary

    var value = Math.random() * 100;
    Math.max(value, Math.max(value + 1, value + 2));
  • Ternary

    var value = Math.random() * 100;
    Math.max(value, value + 1, value + 2);