kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #24386
Re: Optimization
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!
--
Lorenzo Marcantonio
CZ Srl - Parma
Attachment:
signature.asc
Description: PGP signature
Follow ups
References