[PATCH] math: Optimize frexp with fast path for normal numbers

Paul Zimmermann Paul.Zimmermann@inria.fr
Tue Oct 21 15:32:46 GMT 2025


       Hi Osama,

thank you for your patch. To measure the speed improvements, it would be nice
to add some benchmarks for the frexp functions.

For example for frexpf:

* copy the file benchtests/lgammaf_r-inputs to benchtests/frexpf-inputs
  (frexpf has the same signature as lgammaf_r). You can change the input
  values if you like, but random values in [-20.0,20.0] are fine.

* add frexpf in benchtests/Makefile

* run make bench BENCHSET="bench-math" before and after your patch

* extract the timings for frexpf in benchtests/bench.out
  and compute the speed improvement (make sure to mention your processor)

Best regards,
Paul





More information about the Libc-alpha mailing list