Home GnuPG
Diffusion GnuPG d24594976686

tofu: Compare squares instead of square roots.

Description

tofu: Compare squares instead of square roots.

* g10/Makefile.am (tofu_source) [USE_TOFU]: Remove sqrtu32.h and
sqrtu32.c.
* g10/sqrtu32.h, g10/sqrtu32.c: Removed files.
* g10/tofu.c: Compare squares instead of square roots.

The original code is a factor 11.5 slower than using libm's sqrt(),
which in turn is a factor 3.5 slower than using one multiplication
on the other side of the comparison. Also, it's much simpler now.

  • Signed-off-by: Marcus Brinkmann <mb@g10code.com>

Details

Provenance
marcusAuthored on Jul 6 2017, 1:52 PM
Parents
rG1455b406e63d: speedo: Provide a vagrantfile to test speedo in an isolated VM.
Branches
Unknown
Tags
Unknown