Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/25/09 13:22
Read: times


 
#164831 - Further optimization
Responding to: ???'s previous message
But this can be optimized further, i.e. the error-correction term don't need to be evaluated for every step. Instead it can be handled once every n steps - in this case n = int(11/3) = 3 - since you know that after the extra step has been taken, the error term can't overflow for a couple of steps. In this case, the worst-case error can be 2/11 after the correction, guaranteeing that 5/11, 8/11 will not overflow, i.e. you can always do at least 3 steps after a correction.

Another optimization is to work with signed numbers, and adjust the error term to work symmetrically around zero, to allow the processor flags to be used to indicate a correction, instead of all the time having to compare with 11.

List of 19 messages in thread
TopicAuthorDate
Values interpolation            01/01/70 00:00      
   A possible start            01/01/70 00:00      
      The Brezingham Line Drawing algorithm            01/01/70 00:00      
         http://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm ?            01/01/70 00:00      
            Good method            01/01/70 00:00      
               Integer Digital Differential Analyzer            01/01/70 00:00      
   Simple scheme...            01/01/70 00:00      
      Further optimization            01/01/70 00:00      
         You are absolutely right, of course,...            01/01/70 00:00      
   Having a hard time trying to understand :(            01/01/70 00:00      
      Clarification Needed            01/01/70 00:00      
         Even more confused now            01/01/70 00:00      
            Another Shot            01/01/70 00:00      
               code            01/01/70 00:00      
                  Provided Code            01/01/70 00:00      
                     Maybe this            01/01/70 00:00      
                        Give this a try...            01/01/70 00:00      
            Look it up            01/01/70 00:00      
      Now, we have a hard time to understand...            01/01/70 00:00      

Back to Subject List