commit | a401d709654e3d194eb9b4f7c1e938925f1b4cfc | [log] [tgz] |
---|---|---|
author | serge-sans-paille <sguelton@mozilla.com> | Wed May 08 14:21:31 2024 +0000 |
committer | Copybara-Service <copybara-worker@google.com> | Wed May 08 07:30:50 2024 -0700 |
tree | 4daa0d28acb0df301e163800b67de824e5070fa1 | |
parent | 76241545bdbb169cffe0556ecc8f359a8cf3946d [diff] |
[libc++] Implement std::gcd using the binary version (#77747) The binary version is four times faster than current implementation in my setup, and generally considered a better implementation. Code inspired by https://en.algorithmica.org/hpc/algorithms/gcd/ which itself is inspired by https://lemire.me/blog/2013/12/26/fastest-way-to-compute-the-greatest-common-divisor/ Fix #77648 GitOrigin-RevId: 27a062e9ca7c92e89ed4084c3c3affb9fa39aabb