Hi

On 08-07-2015 05:33, Virendra Kumar Pathak wrote:
> 
> Hi Linaro Toolchain Group,
> 
> I am comparing execution time (run time) of sin() trigonometric function 
> between following glibc (including libm) libraries for aarch64 (juno cortex 
> a57) :
> Linaro glibc 2.19, Linaro eglibc 2.19, eglibc 2.19 (from 
> http://www.eglibc.org/) and Linaro glibc 2.21.
> 
> My observation for execution time of sin():
> 
> with Linaro glibc 2.19 and eglibc 2.19 = 1m24.703s (approx)
> whereas,
> with  Linaro eglibc 2.19 & Linaro glibc 2.21 = 0m25.243s (approx)
> 
> Has Linaro optimized the libm functions for aarch64 in Linaro eglibc 2.19 ?
> If yes, please point me to relevant reference from where I can find more 
> information on them.
> 
> Since the eglibc development from version 2.19 has stopped, will Linaro 
> maintain its own development version of glibc ?
> 

This is due commits which has landed in GLIBC 2.20 (and backported to
linaro 2.19):

7e0b6763e96ef9706ea9ecc7fad83fc97b837913 - [AArch64] Provide initial 
implementation of math_private.h.
bc93ab2946efe008bb0ce2d4d3c212bd01384fca - [AArch64] Define HAVE_RM_CTX and 
related hooks.
693096cc7b397a709f075865993027c14c06d3e5 - [AArch64] Switch from FE_TOWARDZERO 
to _FPU_FPCR_RM_MASK
656b84c2ef525e3b69802c9057c5897e327b0332

They basically add internal GLIBC rounding and exception rounding modes to
avoid excessive set/restore in internal math code.  The math implementation
for some function explicit set the rounding mode for some computation to
avoid excessive rounding errors in non-default rounding mode.  Without this
pathes the round set/restore is done in every call and the change aims to
just set/restore the rounding mode if current rounding differs from the
one aimed in math implementation.

And EGLIBC has not only stopped for 2.19, it has stopped development of
all version. Now all development is done on GLIBC project.

> 
> I am using below snippet code and linux 'time' command to calculate the time.
> void sin_func(void)
> {
>         double incr = 0.732;
>         double result, count = 0.0;
> 
>         printf("%s\n", __func__);
> 
>         while (count < 105414350.0) {
>                 result = sin(count);
>                 count += incr;
>         }
> }
> 
> Thanks.
> 
> -- 
> with regards,
> Virendra Kumar Pathak
> 
> 
> _______________________________________________
> linaro-toolchain mailing list
> linaro-toolchain@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/linaro-toolchain
> 
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to