title: Why Bresenham's line algorithm more efficent then Naive algorithm
body: <p>For my graphics course we were taught the Naive line rasterizing algorithm then Bresenham's line drawing algorithm. We were told computers are integer machines which is why we should use the latter. </p>
  
  <ol>
  <li><p>If we assume no optimization on software level is this true for modern cpus with mmx and other instruction sets ? As I have looked at Intel’s 64-ia-32-architectures-optimization-manual.pdf and the latency for addition subtraction multiplication is the same or better for float compared to int for mmx.</p></li>
  <li><p>If the algorithm is executed in the gpu should this matter ? As having checked <a href="http://developer.download.nvidia.com/compute/cuda/1_0/NVIDIA_CUDA_Programming_Guide_1.0.pdf" rel="nofollow noreferrer">NVIDIA CUDA Programming Guide 1.0 (pdf)</a>, page 41, the clock cycles for int and float are the same. </p></li>
  <li><p>What is the de-efficiency of casting float to int? is load-hit-store stall a real issue for us?</p></li>
  <li><p>How efficient are  functions which round up/down numbers? (we can think of the implementation in c++ stl)</p></li>
  <li><p>Is the efficiency gained from Bresenham algorithm due to addition instead of the multiplication used in the inner loop?</p></li>
  </ol>