title: Node.js optimization with constants
body: <p>Please compare:</p>
  <pre><code>// Version 1
      const oneHour = 60 * 60
      function checkTime(timePast) {
          if (timePast&lt;7 * 24 * oneHour) {
              // Do something
          }
      }
  
  // Version 2
      const oneHour = 60 * 60
      const oneWeek = 7 * 24 * oneHour
      function checkTime(timePast) {
          if (timePast&lt;oneWeek) {
              // Do something
          }
      }
  </code></pre>
  <p>During millions of calls to checkTime(), is version 2 faster than version 1, or is Node.js smart enough to make the extra calculation in version 1 only once?</p>