[libc-commits] [PATCH] D129275: [libc][math] Added coshf function.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jul 29 06:31:49 PDT 2022

lntue added a comment.

In D129275#3686972 <https://reviews.llvm.org/D129275#3686972>, @orex wrote:

> Thank you Paul for sharing the results. 
> The results I got using the same compiler (llvm 11) as Paul (@zimmermann6):
>   CORE_MATH_PERF_MODE=rdtsc PERF_ARGS='' ./perf.sh coshf
>   GNU libc version: 2.31
>   GNU libc release: stable
>   18.534
>   13.019
>   17.590
>   CORE_MATH_PERF_MODE=rdtsc PERF_ARGS='--latency' ./perf.sh coshf
>   GNU libc version: 2.31
>   GNU libc release: stable
>   49.670
>   38.334
>   50.461
> As you can see llvm 12 significantly improve throughput of this version of coshf over version 11. Partially this problem can be explained by this difference. Another source of the difference is Intel vs AMD. We observe such difference with (@lntue).
> Paul, can you confirm, that the precision is OK? I think that we can push the changes even though the solution is not the fastest for all platforms/compilers? Tue?

Even though there is a regression in performance with clang-11, it still looks good for me.  You can go ahead with this patch.

  rG LLVM Github Monorepo



More information about the libc-commits mailing list