This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]