View Single Post
Old 02 August 2022, 07:49   #227
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,105
If you extend the table to cover 90 degrees more (repeat the 64 first entries at the end) you can do the double lookup in 32 cycles (and 7 memory accesses):

Code:
    ext.w     d0
    move.b    64(a0,d0.w),d1
    move.b    (a0,d0.w),d0
Doesn't extend as nicely to larger tables (or word sized values), but the idea of having an extra pi/2 values at the end (or start) of a sin/cos table can often be used for a slight speed-up at the cost of extra memory usage.
paraj is offline  
 
Page generated in 0.04508 seconds with 11 queries