Implications of pure and constant functions
pure
and const
are function attributes supported e.g. by gcc
and icc
which provide the compiler with more detailed characteristics of a particular function, so the
compiler can better optimize the resulting code. An nice explanation can be found here:
- Implications of pure and constant functions
https://lwn.net/Articles/285332/
— Martin Burnicki martin.burnicki@burnicki.net 2018-11-02