[roll] Roll llvm-project/libc [libc][math] Improve the performance of sqrtf128. (#122578)

Use a combination of polynomial approximation and Newton-Raphson
iterations in 64-bit and 128-bit integers to improve the performance of
sqrtf128. The correct rounding is provided by squaring the result and
comparing it with the argument.

Performance improvement using the newly added perf test:
- My function = the improved implementation from this PR
- Other function = current implementation using
`libc/src/__support/FPUtil/generic/sqrt.h`
```
 Performance tests with inputs in denormal range:
-- My function --
     Total time      : 1260765265 ns
     Average runtime : 125.951 ns/op
     Ops per second  : 7939623 op/s
-- Other function --
     Total time      : 7160726518 ns
     Average runtime : 715.357 ns/op
     Ops per second  : 1397902 op/s
-- Average runtime ratio --
     Mine / Other's  : 0.176067

 Performance tests with inputs in normal range:
-- My function --
     Total time      : 373003808 ns
     Average runtime : 37.2631 ns/op
     Ops per second  : 26836189 op/s
-- Other function --
     Total time      : 7353398916 ns
     Average runtime : 734.605 ns/op
     Ops per second  : 1361275 op/s
-- Average runtime ratio --
     Mine / Other's  : 0.0507254
```

---------

Co-authored-by: Alexei Sibidanov <sibid@uvic.ca>
GitOrigin-RevId: 8e36849b9f37d288a927589209924cfd714d096b
Original-Revision: 3c4ef4ff8bfcaa144568bf58dcede3736867bacb
Change-Id: Ib318e63550f53d52f749f22235e424c6388f9cee
1 file changed
tree: 1de1e2a737ad2f5f151f3404360e85725b32c7d8
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.