‘ … != null’ or ‘null != ….’ best performance?

Comparing the generated bytecodes is mostly meaningless, since most of the optimization happens in run time with the JIT compiler. I’m going to guess that in this case, either expression is equally fast. If there’s any difference, it’s negligible.

This is not something that you need to worry about. Look for big picture optimizations.

Leave a Comment