[vorbis-dev] Another good optimization (for PPC only, though)
Segher Boessenkool
segher at wanadoo.nl
Mon Nov 27 13:55:03 PST 2000
"Timothy J. Wood" wrote:
>
> This would return zero for a negative input, though. This would make it harder to track down illegal calls to sqrt. I'd rather not change the semantics of sqrt(), just make it faster.
Compilation is with -ffast-math, so no checks are being done, either
way. Better be
sure we just call sqrt() on non-negative data, anyway :-)
>
> Most architectures have a fabs instruction these days, so this should be a fast approach everywhere (well, everywhere that also has inverse sqrt :)
Having a fabs insn doesn't mean it's fast... there are real-life
examples (some x86)
where it isn't.
Dagdag,
Segher
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list