…? Brendan Mcmillon, the author of CloudFlare’s fast BN-256 library, elaborates in a short article. TL;DR high-level languages are horribly inefficient for many things, but careful optimisation can result in a 15–25x speed improvement simply by taking advantage of the underlying processor instructions designed specifically for these kinds of tasks.
In the mental model of Solidity, when
assert() fails, the programmer is broken, the Solidity compiler is broken, or Ethereum is broken. Anyone can call any contract on Ethereum, and none of the above applies. So
revert()should be used.