This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
libm math performance
- From: tim <tim at klingt dot org>
- To: libc-help at sourceware dot org
- Date: Tue, 19 Mar 2013 16:06:25 +0100
- Subject: libm math performance
hi all,
i've recently update one of my machines from ubuntu 12.10 to 13.04. the
first shipped with glibc-2.15, the new one with 2.17.
benchmarking some audio synthesis (floating-point number crunching with
some trigonometric functions, though most of), it seems that a
significant part of the CPU time is spent in feraiseexcept, mainly in:
856c: 83 e7 20 and $0x20,%edi
856f: 74 0f je 8580 <feraiseexcept+0x60>
8571: d9 74 24 d8 fnstenv -0x28(%rsp)
8575: 66 83 4c 24 dc 20 orw $0x20,-0x24(%rsp)
857b: d9 64 24 d8 fldenv -0x28(%rsp)
afaict, this part is related to handling of FE_INEXACT ... about 5% of
the full application is spent there ... (another 5% is spent in other
libm functions like __sin_avx, __cos_avx, __atan_avx, the rest is mainly
floating-point arithmetics)
so i wonder, has there been any changes in glibc which could explain
this? and is this a regression or is it expected behavior?
thanks, tim