4 ms·
Well-disposed as I am towards laziness, you may well not want short-circuiting, depending on the application. I just re-wrote the C implementations of logical
by gnufx 5y ago
Well-disposed as I am towards laziness, you may well not want short-circuiting, depending on the application. I just re-wrote the C implementations of logical reductions using bitwise operators instead to && and || to get them vectorized -- avoiding "conditional in loop". (They're Fortran-callable.)
Incidentally, gfortran treats the reduction like C, which seems a deficiency as the standard allows it not to.