Description
develop...stackShufflingPerformance has some preliminary work towards replacing the "muiltiplicity maps" during stack shuffling by simple vector lookups by assigning continuous indices to the stack slots before executing the tight stack shuffling loop in
solidity/libyul/backends/evm/StackHelpers.h
Line 113 in dc7cda1
The stack shuffling is invoked in two places, one of them an adding additional PreviousSlot
construction for symbolic stack shuffling on top of the regular stack slots (with uncommon comparison behaviour). That latter use is by far not as performance critical as the use in createStackLayout
, but it needs to keep working nonetheless.
Tasks:
- reevaluate the via-IR-compilation performance gain of develop...stackShufflingPerformance (e.g. at the
chains.sol
benchmark) - if the improvement is confirmed as significant, build a less-aggressively-templated index-based implementation of
solidity/libyul/backends/evm/StackHelpers.h
Line 105 in dc7cda1
ShuffleOperations
(since they differ in both places of use).
I have an additional improvement on top of the branch here https://gist.github.com/ekpyron/743c93f92bdaa9b61ff6019e72eab03e that improves the performance of assigning indices to stack slots - but it relies on boost::unordered_flat_map
and we can't easily bump the boost version one that is recent enough to support that, but it'd also be interesting to at least locally evaluate the additional performance increase we can get from that to see if it's worthwhile to purse that further.
Metadata
Metadata
Assignees
Type
Projects
Status