title: Is the use of `const` dogmatic or rational?
body: <p>In Delphi you can speed up your code by passing parameters as <code>const</code>, e.g.</p>
  
  <pre><code>function A(const AStr: string): integer;
  
  //or
  
  function B(AStr: string): integer;
  </code></pre>
  
  <p>Suppose both functions have the same code inside, the speed difference between them is negligible and I doubt it can even be measured with a cycle-counter like:</p>
  
  <pre><code>function RDTSC: comp;
  var
    TimeStamp: record case byte of
      1: (Whole: comp);
      2: (Lo, Hi: Longint);
    end;
  begin
    asm
      db $0F; db $31;
      mov [TimeStamp.Lo], eax
      mov [TimeStamp.Hi], edx
    end;
    Result := TimeStamp.Whole;
  end;
  </code></pre>
  
  <p>The reason for this is that all the <code>const</code> does in function A is to prevent the reference count of <code>AStr</code> to be incremented.<br>
  But the increment only takes one cycle of one core of my multicore CPU, so...</p>
  
  <p>Why should I bother with <code>const</code>?</p>