[libc-commits] [libc] [libc][math][c23] Add expf16 C23 math function (PR #100632)
via libc-commits
libc-commits at lists.llvm.org
Tue Jul 30 08:05:57 PDT 2024
overmighty wrote:
Before, on i7-13700H:
- With Clang 18, without `-march=native`:
```
Performance tests with inputs in denormal range:
-- My function --
Total time : 1626076534 ns
Average runtime : 79.4759 ns/op
Ops per second : 12582433 op/s
-- Other function --
Total time : 21810517 ns
Average runtime : 1.06601 ns/op
Ops per second : 938079551 op/s
-- Average runtime ratio --
Mine / Other's : 74.5547
Performance tests with inputs in normal range:
-- My function --
Total time : 23652101150 ns
Average runtime : 38.4975 ns/op
Ops per second : 25975704 op/s
-- Other function --
Total time : 648820903 ns
Average runtime : 1.05606 ns/op
Ops per second : 946917704 op/s
-- Average runtime ratio --
Mine / Other's : 36.454
```
- With Clang 18, with `-march=native`:
```
Performance tests with inputs in denormal range:
-- My function --
Total time : 329939627 ns
Average runtime : 16.1261 ns/op
Ops per second : 62011344 op/s
-- Other function --
Total time : 21790717 ns
Average runtime : 1.06504 ns/op
Ops per second : 938931931 op/s
-- Average runtime ratio --
Mine / Other's : 15.1413
Performance tests with inputs in normal range:
-- My function --
Total time : 22716554242 ns
Average runtime : 36.9748 ns/op
Ops per second : 27045475 op/s
-- Other function --
Total time : 648758548 ns
Average runtime : 1.05596 ns/op
Ops per second : 947008716 op/s
-- Average runtime ratio --
Mine / Other's : 35.0154
```
After:
- With Clang 18, without `-march=native`:
```
Performance tests with inputs in denormal range:
-- My function --
Total time : 1515840736 ns
Average runtime : 74.088 ns/op
Ops per second : 13497460 op/s
-- Other function --
Total time : 27118777 ns
Average runtime : 1.32545 ns/op
Ops per second : 754458801 op/s
-- Average runtime ratio --
Mine / Other's : 55.8964
Performance tests with inputs in normal range:
-- My function --
Total time : 23072321763 ns
Average runtime : 37.5538 ns/op
Ops per second : 26628442 op/s
-- Other function --
Total time : 810717705 ns
Average runtime : 1.31957 ns/op
Ops per second : 757822354 op/s
-- Average runtime ratio --
Mine / Other's : 28.4591
```
- With Clang 18, with `-march=native`:
```
Performance tests with inputs in denormal range:
-- My function --
Total time : 224244813 ns
Average runtime : 10.9602 ns/op
Ops per second : 91239568 op/s
-- Other function --
Total time : 21774833 ns
Average runtime : 1.06426 ns/op
Ops per second : 939616850 op/s
-- Average runtime ratio --
Mine / Other's : 10.2983
Performance tests with inputs in normal range:
-- My function --
Total time : 21790749065 ns
Average runtime : 35.4679 ns/op
Ops per second : 28194533 op/s
-- Other function --
Total time : 648719445 ns
Average runtime : 1.05589 ns/op
Ops per second : 947065799 op/s
-- Average runtime ratio --
Mine / Other's : 33.5904
```
https://github.com/llvm/llvm-project/pull/100632
More information about the libc-commits
mailing list