BaseXdb/basex — comment on commit f5663e4990fe1b375558c922208b5330f2af9ed3
File: src/main/java/org/basex/core/Context.java line 97
By dimitarp:

I also think, that !isEmpty() is more readable, and converting it to size() != 0 will definitely not make BaseX any faster (it well may be, that the runtime actually optimizes it on the fly). But in theory, !isEmpty() has one additional operation (the negation). Anyway, it's more a question of personal preference, than a real optimization :)