core - Is Math.max(a,b) or (a>b)?a:b faster in Java? -
which 1 faster in java , why?
math.max(a,b)(a>b)?a:b
(this asked in interview.)
math.max(a, b) static function (meaning no virtual call overhead) , inlined jvm same instructions (a > b) ? : b.
Comments
Post a Comment