kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #06927
Re: Trigonometric look up table.
-
To:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Dick Hollenbeck <dick@xxxxxxxxxxx>
-
Date:
Mon, 19 Sep 2011 14:39:10 -0500
-
In-reply-to:
<1316458848.30042.16.camel@keruseykaryu-VirtualBox>
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Thunderbird/3.1.13
On 09/19/2011 02: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
Do you have approximate benchmarks?
I vaguely remember that on a modern day desktop machine, say Intel, that the sin()
function took only about 12 clock cycles nowadays. This is because of the high end FPUs
in them.
I am not sure about this, and do not have time to research it.
Dick
References