The pure function attribute allows you to declare a function that can be called fewer times than what is literally in the source code. Declaring a function with the attribute pure indicates that the function has no effect except a return value that depends only on the parameters, global variables, or both.
pure function attribute syntax >>-__attribute__--((--+-pure-----+--))------------------------->< '-__pure__-'
Related information