max is faster because it does not perform the isNaN test.F fmax(F)(const F x, const F y) if (__traits(isFloating, F)) @safe pure nothrow @nogcReturns the larger of x and y.
If one of the arguments is a NaN, the other is returned.
max is faster because it does not perform the isNaN test.