]>
git.ipfire.org Git - thirdparty/glibc.git/commit
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>