[libc-commits] [PATCH] D158551: [libc][math] Implement double precision exp function correctly rounded for all rounding modes.

Paul Zimmermann via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Aug 24 01:07:51 PDT 2023


zimmermann6 accepted this revision.
zimmermann6 added a comment.
This revision is now accepted and ready to land.

after help from Tue I was able to use this patch with the core-math tools. All tests pass, and on my machine (AMD EPYC 7282) I get the following timings:

  zimmerma at biscotte:/tmp/core-math$ LIBM=/localdisk/zimmerma/llvm-project/build/projects/libc/lib/libm.a CORE_MATH_PERF_MODE=rdtsc ./perf.sh exp
  GNU libc version: 2.37
  GNU libc release: stable
  [####################] 100 %
  Ntrial = 20 ; Min = 18.639 + 0.385 clc/call; Median-Min = 0.327 clc/call; Max = 21.116 clc/call;
  [####################] 100 %
  Ntrial = 20 ; Min = 13.164 + 0.253 clc/call; Median-Min = 0.280 clc/call; Max = 13.590 clc/call;
  [####################] 100 %
  Ntrial = 20 ; Min = 19.464 + 0.307 clc/call; Median-Min = 0.308 clc/call; Max = 19.828 clc/call;

and for latency:

  zimmerma at biscotte:/tmp/core-math$ LIBM=/localdisk/zimmerma/llvm-project/build/projects/libc/lib/libm.a CORE_MATH_PERF_MODE=rdtsc PERF_ARGS=--latency ./perf.sh exp
  GNU libc version: 2.37
  GNU libc release: stable
  [####################] 100 %
  Ntrial = 20 ; Min = 49.458 + 0.339 clc/call; Median-Min = 0.269 clc/call; Max = 50.109 clc/call;
  [####################] 100 %
  Ntrial = 20 ; Min = 39.380 + 0.326 clc/call; Median-Min = 0.299 clc/call; Max = 39.948 clc/call;
  [####################] 100 %
  Ntrial = 20 ; Min = 54.919 + 0.347 clc/call; Median-Min = 0.310 clc/call; Max = 55.561 clc/call;


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158551/new/

https://reviews.llvm.org/D158551



More information about the libc-commits mailing list