[libc-commits] [libc] [libc][math][c23] Add exp2f16 C23 math function (PR #101217)

via libc-commits libc-commits at lists.llvm.org
Tue Aug 6 06:30:00 PDT 2024


overmighty wrote:

Looks like I forgot to send the performance test results for this one.

On i7-13700H:

- With Clang 18, without `-march=native`:  
  ```
   Performance tests with inputs in denormal range:
  -- My function --
       Total time      : 1608372749 ns 
       Average runtime : 78.6106 ns/op 
       Ops per second  : 12720931 op/s 
  -- Other function --
       Total time      : 21779603 ns 
       Average runtime : 1.0645 ns/op 
       Ops per second  : 939411062 op/s 
  -- Average runtime ratio --
       Mine / Other's  : 73.8477 
  
   Performance tests with inputs in normal range:
  -- My function --
       Total time      : 23050495413 ns 
       Average runtime : 37.5183 ns/op 
       Ops per second  : 26653657 op/s 
  -- Other function --
       Total time      : 648715741 ns 
       Average runtime : 1.05589 ns/op 
       Ops per second  : 947071207 op/s 
  -- Average runtime ratio --
       Mine / Other's  : 35.5325 
  ```

- With Clang 18, with `-march=native`:  
  ```
   Performance tests with inputs in denormal range:
  -- My function --
       Total time      : 326212337 ns 
       Average runtime : 15.9439 ns/op 
       Ops per second  : 62719884 op/s 
  -- Other function --
       Total time      : 27113650 ns 
       Average runtime : 1.3252 ns/op 
       Ops per second  : 754601464 op/s 
  -- Average runtime ratio --
       Mine / Other's  : 12.0313 
  
   Performance tests with inputs in normal range:
  -- My function --
       Total time      : 22112635381 ns 
       Average runtime : 35.9918 ns/op 
       Ops per second  : 27784114 op/s 
  -- Other function --
       Total time      : 810631359 ns 
       Average runtime : 1.31943 ns/op 
       Ops per second  : 757903075 op/s 
  -- Average runtime ratio --
       Mine / Other's  : 27.2783 
  ```


https://github.com/llvm/llvm-project/pull/101217


More information about the libc-commits mailing list