]> git.ipfire.org Git - thirdparty/glibc.git/commit
math: Remove i386 ilogb/ilogbf/llogb/llogbf
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 28 Apr 2025 19:54:49 +0000 (16:54 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 2 Jun 2025 16:32:19 +0000 (13:32 -0300)
commit7c00a20397d8caa3638a26a58900570c8ef21c49
tree9ec8d4158fa1a20bd3be3ce71ef09bb58885b76a
parent39775f00b194e5f10b3b398de57b04a18846814e
math: Remove i386 ilogb/ilogbf/llogb/llogbf

The new float and double implementation does not required an
extra function call and error handling uses math_err function,
which results in better performance on i386 as well.

With gcc-14 on AMD AMD Ryzen 9 5900X, master shows:

$ ./benchtests/bench-ilogb
  "ilogb": {
   "subnormal": {
    "duration": 3.68863e+09,
    "iterations": 1.72228e+08,
    "max": 89.2995,
    "min": 21.016,
    "mean": 21.4171
   },
   "normal": {
    "duration": 3.68878e+09,
    "iterations": 1.72948e+08,
    "max": 78.6065,
    "min": 21.127,
    "mean": 21.3288
   }
  }
$ ./benchtests/bench-ilogbf
  "ilogbf": {
   "subnormal": {
    "duration": 3.68835e+09,
    "iterations": 1.66716e+08,
    "max": 46.953,
    "min": 21.793,
    "mean": 22.1236
   },
   "normal": {
    "duration": 3.68784e+09,
    "iterations": 1.66168e+08,
    "max": 46.9715,
    "min": 21.904,
    "mean": 22.1935
   }
  }

While with this patch:

$ ./benchtests/bench-ilogb
  "ilogb": {
   "subnormal": {
    "duration": 3.68134e+09,
    "iterations": 4.17516e+08,
    "max": 32.5045,
    "min": 8.3245,
    "mean": 8.81723
   },
   "normal": {
    "duration": 3.6677e+09,
    "iterations": 6.79468e+08,
    "max": 50.9305,
    "min": 5.3465,
    "mean": 5.3979
   }
}
$ ./benchtests/bench-ilogbf
  "ilogbf": {
   "subnormal": {
    "duration": 3.67553e+09,
    "iterations": 5.11032e+08,
    "max": 35.927,
    "min": 7.0485,
    "mean": 7.19237
   },
   "normal": {
    "duration": 3.66877e+09,
    "iterations": 6.556e+08,
    "max": 26.3625,
    "min": 5.5315,
    "mean": 5.59605
   }
 }

Checked on i686-linux-gnu.

Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
sysdeps/i386/fpu/e_ilogb.S [deleted file]
sysdeps/i386/fpu/e_ilogbf.S [deleted file]
sysdeps/i386/fpu/w_ilogb.c [deleted file]
sysdeps/i386/fpu/w_ilogbf.c [deleted file]
sysdeps/i386/fpu/w_llogb.c [deleted file]
sysdeps/i386/fpu/w_llogbf.c [deleted file]