Open Quazia opened 1 year ago
Could you tell me what the reason is for this change?
It's just a gas improvement, not super pressing. As far as I know internal and external are both more efficient than public. It's possible recent compiler optimizations have made this an outdated optimization and I think if you crank the solc optimization up enough it actually handles stuff like this. I can wait and do the gas testing before making this change so we can see sure. It takes up more storage in exchange for a little cheaper execution. You see a lot more benefit in situations where you're calling the same public function multiple times internally.
There's a few places we use a
public view
where we could have aninternal view
that's accessible by way of anotherexternal view
.For example:
Would become: