title: CUDA: Is coalesced global memory access faster than shared memory? Also, does allocating a large shared memory array slow down the program?
body: <p>I'm not finding an improvement in speed with shared memory on an NVIDIA Tesla M2050
  with about 49K shared memory per block. Actually if I allocate
  a large char array in shared memory it slows down my program. For example</p>
  
  <pre><code>__shared__ char database[49000];
  </code></pre>
  
  <p>gives me slower running times than</p>
  
  <pre><code>__shared__ char database[4900];
  </code></pre>
  
  <p>The program accesses only the first 100 chars of database so the extra space
  is unnecessary. I can't figure out why this is happening. Any help would be appreciated.
  Thanks.</p>