It seems that allocating storage elements is 4x as expensive in terms of gas cost than changing them.

Does that mean it would make sense to pool structs and arrays, and maybe also strings, rather than recreating them? Did anyone see such a pattern in solidity?

  • 1
    Could you explain what you mean by "pool" and "recreate"? It might help to give an example of what you're talking about. – user19510 Aug 23 '18 at 4:27

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.