math: new log2
authorSzabolcs Nagy <nsz@port70.net>
Sat, 1 Dec 2018 00:53:54 +0000 (00:53 +0000)
committerRich Felker <dalias@aerifal.cx>
Thu, 18 Apr 2019 03:45:13 +0000 (23:45 -0400)
commit2a3210cf4abff0a69ff3e7adc66591dfe6ab2197
tree6fd3ac932c34d33a48c0604a7fcf5b1b8760b83d
parent236cd056e871acb8731cd84b5bfb6f0feb646589
math: new log2

from https://github.com/ARM-software/optimized-routines,
commit 04884bd04eac4b251da4026900010ea7d8850edc

code size change: +2458 bytes (+1524 bytes with fma).
benchmark on x86_64 before, after, speedup:

-Os:
  log2 rthruput:  16.08 ns/call 10.49 ns/call 1.53x
   log2 latency:  44.54 ns/call 25.55 ns/call 1.74x
-O3:
  log2 rthruput:  15.92 ns/call 10.11 ns/call 1.58x
   log2 latency:  44.66 ns/call 26.16 ns/call 1.71x
src/math/log2.c
src/math/log2_data.c [new file with mode: 0644]
src/math/log2_data.h [new file with mode: 0644]