3 ms·
I submitted a bug report to GCC: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81478 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81478 Even though it's not a
by s__mac 9y ago
I submitted a bug report to GCC:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81478 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81478
Even though it's not a real bug, it's a missed optimization. My pitch is to emit the code to do the multiplication, and only call a fixup function when the results are NaN. If you short-circuit the NaN check, you only need 3 pretty cheap instructions to decide to call the standard library for help, and you can avoid it in the vast vast majority of cases. This should make multiplication and division much faster in the default case. Naturally the checks would still be elided with -fcx-limited-range is on.