I have a function that does not read or modify contract's state:
contract C {
function add(uint a, uint b) public returns (uint) {
uint res = a + b;
return res;
}
}
Does it make sense to use pure/view modifier? I mean, will the function use less gas after that or what is the reason to use it?