3 ms·
> advocating the use of __builtin functions vs standard functions It wouldn't say it "advocates" for the use of builtins. The author demonstrates a problem the
by twtw 8y ago
> advocating the use of __builtin functions vs standard functions
It wouldn't say it "advocates" for the use of builtins. The author demonstrates a problem they had (including math.h made their compile times 2x slower in c++17 mode) and shows their solution, and advocates changing libc++ so that c headers don't pull in c++ stuff.
In any case, the snippet you object to uses the builtins if they are available, or falls back to math.h. It's a hack to avoid math.h when it's slow to compile, but stills seems pretty portable?