This means if you only use constants, it is compiled in a different way than if you do it with variables
This holds true for everything though. Any expression using only constants (and thus by extension, also being a constant), is replaced (at compile time) by its value, as there is no need to do expensive operations when the result is already known. Pretty run-of-the-mill compiler optimization.