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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/17/06 20:15
Modified:
  08/17/06 20:33

Read: times


 
#122499 - I forgot to mention ...
Responding to: ???'s previous message
... this stuff never ran on a '51. It started out with a 68k and moved to various other architectures from that.

Yes, I tried the C code for square root calculation on a '51 simulator just for fun and it still takes quite a while (~800 us @ 12 Mhz on a 1-clocker, but somehow I think the simulator is making that number up. 10000 cycles, come on ?), but that's mainly because there's some bit-shifting involved that would work much better when done in assembly (most compilers are horrible at tasks like "shift two MSBs of variable A into the two LSBs of variable B"), or on a processor that can natively shift 32 bit integers, or by doing it in C in a way that avoids shifting anything larger than 8 bit most of the time.

However, I think it will still be faster than the big chunk that I found.



List of 21 messages in thread
TopicAuthorDate
Things you find ...            01/01/70 00:00      
   10 lines PLUS a whole bunch of 'lines'            01/01/70 00:00      
      I forgot to mention ...            01/01/70 00:00      
         sounds reasonable            01/01/70 00:00      
            I'll optimize it tomorrow.            01/01/70 00:00      
               haven't heard of that one            01/01/70 00:00      
                  Do it using the RLC instruction.            01/01/70 00:00      
               Optimized results:            01/01/70 00:00      
                  how does the lookup table approach time            01/01/70 00:00      
                     Comparison:            01/01/70 00:00      
                        Table error            01/01/70 00:00      
                           No error.            01/01/70 00:00      
                           So how did you calculate/measure the average?            01/01/70 00:00      
                              Right below the table:            01/01/70 00:00      
   I do the same thing            01/01/70 00:00      
      Lookup table will win hands down            01/01/70 00:00      
         For floats, yes. For long ints ... not so sure.            01/01/70 00:00      
   one more thing            01/01/70 00:00      
   if the precision is not 'critical'            01/01/70 00:00      
      Another source            01/01/70 00:00      
         What about a Hardware Solution?            01/01/70 00:00      

Back to Subject List