On 9/19/2011 3:00 PM, Kerusey Karyu wrote: > Dnia 2011-09-19, pon o godzinie 11:15 -0400, Wayne Stambaugh pisze: >> Is there any logical reason to keep using the trigonometric look up tables in >> trigo.cpp? We currently have a mixed bag of using the look up tables and the >> math sin() and cos() functions in various code paths. If no one objects, I >> think it's time to remove them from Kicad. >> >> Wayne >> > I'm not familiar with a KiCAD source, but I think the lookup tables > should stay. Why? In some cases a lookup will be faster than math > functions. I don't know, but while redrawing - an arc for example - > these tables speed-up a lot the screen refreshing. > > Kerusey Karyu
Which cases are you speaking of? The sin() and cos() functions are already being used in quite a few places in the PCBNew code instead of the look up tables. I find it difficult to believe that modern floating point processors would take more than a few clock cycles to perform any trigonometric function calculation. Is someone using Kicad on a system without a math coprocessor? If you can give me a quantifiable example where the look up table is significantly (more than a few milliseconds on a very large design) faster, then I might be inclined to agree with your argument. The screen refresh speed issue is due the speed of graphic device interface of the platform in question. If you want to verify this, build Kicad with USE_WX_GRAPHIC_CONTEXT enabled on Windows and watch your drawing time increase significantly. Wayne > > > > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : [email protected] > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp > _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

