Timeline for Solidity optimizer vs LLVM optimizer
Current License: CC BY-SA 3.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 29, 2021 at 3:23 | comment | added | Jessie Lesbian | Simple version: Solidity Optimizer reduces gas usage, when LLVM optimizer reduces the cost of running a node | |
Apr 12, 2017 at 19:39 | comment | added | Matthew Schmidt | I'm not sure how the JIT works in this particular case, but nonetheless: Any client-side optimization still can't affect the gas used, because the EVM is the same for everyone, regardless of how they implement it. Think of it this way: an optimized client and one without an optimizer (or a different one) have to get the same result for a transaction's execution, or the blockchain would fork between them. | |
Apr 12, 2017 at 14:22 | comment | added | Than21 | That's what I thought initially. However, my understanding is that gas is actually computed at runtime (as the contract executes) and the EVM injects gas functions into the llvm-ir. So essentially - and correct me if I'm wrong - an llvm optimization could have a direct impact on gas just like a bytecode optimization in the Solidity compiler. I see though, that such an optimization in llvm might be more complex to implement since operations are now much more fine-grained .... so my hypothesis right now is that this is why there are two optimizers. Does that make sense ? | |
Apr 11, 2017 at 19:39 | history | answered | Matthew Schmidt | CC BY-SA 3.0 |