I was told this at DappCon! A 10% increase. Though from how many small optimizations was never unveiled since we moved on to other topics. But I thought I would bring it up because the guy was no slouch.
It didn’t occur to me at the time but this is exactly what exists in the form of the optimizer. I just forgot about the optimizer since those I’ve spoken to about it have expressed reservations about the security of its bytecode output. But simply replacing blocks seemed fairly innocuous, so these two sections of my brain didn’t overlap…
But yes, this is basically what the optimizer does.
readability is very important in smart contracts. I would say since smart contracts usually handle funds. its at least as important as gas savings. So this is one reason to keep the code nice and readable. For me shorter code is more readable.
Functions should not have so much overhead. depends how you pass the arguments. a function means an additional jump and some stack operations, but if arguments are passed using a struct its passed byRef so a functions overhead shouldn’t be that big.