← Back to team overview

kicad-developers team mailing list archive

Re: Optimization

 

On 4/29/2016 4:48 AM, Lorenzo Marcantonio wrote:
> On Thu, Apr 28, 2016 at 08:51:58PM +0200, Simon Richter wrote:
>> separate sin() and cos() invocations by a single call to sincos(),
>> almost cutting computation time in half by computing both at the same
>> time using vector instructions.
> 
> I guess that's gcc auto-intrinsic conversion at work. sincos is a single
> opcode since the 387 if I remember correctly (and it's faster if the
> argument is already normalized). I don't know if it's exploiting some
> peculiarity in the polynomial expansion or simply the microcode does
> that in parallel...
> 
> Some time ago I did some light testing and the precision is enough for
> our fixed point application. Of course integer vector algebra is
> preferrable to engaging the FPU (when possible...). OTOH it would be
> (maybe) technically possible to parallelize the processor station's work
> doing simultaneously integer and FP computation. Don't know if gcc can
> do that (since SSE uses the same registers and switching between it and
> the FPU is somewhat expensive IIRC). I doubt that this kind of
> extreme optimization belongs to kicad anyway!

If we ever get the KiCad source code to the point where this is our
biggest issue, I'm going to retire to some exotic island, put my toes in
the sand, and sip drinks with little paper umbrellas in them. :)

> 
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
> 



References