1

Studying the Solidity optimizer, I found that the assembly code is divided into tags and the optimizer doesn't work between them:

It splits the sequence of instructions into basic blocks at JUMPs and JUMPDESTs.

After reading all the documentation, what I can gather is that the tags are those blocks, but I can't get a clear idea on the following:

  • Why the optimisation fails between tags only for storage and memory OP? - Is there some example of an operation optimisation between the tags?

Thanks in advance!

  • if you are so worried about the cost of instruction, why don't you write your contract directly on assembly. it is going to be the best way to optimize it – Nulik Dec 16 '17 at 0:21
  • I never wrote that i'm worried about the cost of gas or that i have to write any contract, i'm just studying the optimizer behaviour. – milonite Dec 16 '17 at 2:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.