3 ms·
(I'm the author) You're right, I should have specified -- it is glibc 2.32-48 . This the source specifying how glibc is built: https://github.com/NixOS/nixpkgs
by rostayob 5y ago
(I'm the author)
You're right, I should have specified -- it is glibc 2.32-48 . This the source specifying how glibc is built: https://github.com/NixOS/nixpkgs/blob/97c5d0cbe76901da0135b05cdbdfc5b068a7942c/pkgs/development/libraries/glibc/default.nix https://github.com/NixOS/nixpkgs/blob/97c5d0cbe76901da0135b0... .
I've amended the article so that it says `glibc` rather than `libc`, and added a sidenote specifying the version.
I link to it statically as indicated in the gist, although I believe that shouldn't matter. Also see https://gist.github.com/bitonic/d0f5a0a44e37d4f0be03d34d47acb6cf#gistcomment-3864005 https://gist.github.com/bitonic/d0f5a0a44e37d4f0be03d34d47ac... .
Note that the hardware is not particularly recent (Q3 2017), but we tend to rent servers which are not exactly on the bleeding edge, so that was my platform.
- stephencanon 5y agoThanks for clarifying! Without benchmarking, I would expect atan2f to be around 20-30 cycles per element or less with either Intel's or Apple's scalar math library, and proportionally faster for their vector libs.
- rostayob 5y agoThanks for the info. By the way, your writing on floating point arithmetic is very informative -- I even cite a message of yours on FMA in the post itself!
- floxy 5y agoThanks for the interesting writeup. I wonder if it is because glibc has a less-optimized atan2f (for floats). The double version seems quite involved in glibc anyway: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/ieee754/dbl-64/e_atan2.c;h=b77ad2dc6b9561e6396a76db11f6db686f170bb1;hb=ae37d06c7d127817ba43850f0f898b793d42aea7 https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/iee... ...where the atan2f version ends up calling atan, which doesn't seem as sophisticated: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/ieee754/flt-32/s_atanf.c;h=f61b0f5ef64866fb053a87f9c1a968165ba4de2a;hb=ae37d06c7d127817ba43850f0f898b793d42aea7 https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/iee...