You prepend "function" with "constant ". It puts some syntactic limitation on the function which encourages vex's optimizer to do some simplifications. It has zero effect on the runtime.
I've also heard that if you're giving your friend or whoever say, a JASS spell, you can use constants to make it easier for him/her to edit the values.
EDIT: Btw, is it better to just use another function to call a function that would take the place of a constant function instead of making a constant function?