Any::isNull check

Paul Benedict pbenedict at apache.org
Wed Dec 16 15:38:24 UTC 2015


When a method is specialized for values, Any::isNull can only return
"false", which means if(Any.isNull(o)) can only ever have one outcome --
the other code branch can be discarded by the compiler. I know it's too
early to talk about optimizations :-) but will javac be smart enough to
recognize this optimization? Is it on your list for the future?

Cheers,
Paul


More information about the valhalla-dev mailing list