[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Murcake/optimize array load #160

Merged
merged 6 commits into from
Dec 19, 2021
Merged

Conversation

temyurchenko
Copy link
Contributor

No description provided.

Now 'length' or 'len' refers to the number of cells in an
     array. 'size' refers to the number of bytes. We used to mix them
     and it made things confusing.
It was just wrong and it just never came up for some reason. Added
     some tests to detect in the future.
Base automatically changed from murcake/pow-jump-table to develop December 18, 2021 14:38
@temyurchenko temyurchenko force-pushed the murcake/optimize-array-load branch 3 times, most recently from 4c155a9 to e46c332 Compare December 18, 2021 15:29
The reason for the shift is to optimize for the hot-path. Most of the
     calldata read positions follow the same pattern: 'n * 32 +
     4' (the first four bytes in calldata in Solidity represent a
     function selector). Thus, most of the calldata reads are
     /unaligned/ in regards to bit packing. In order to align them, we
     perform the 12-byte shift.
remove usage of comparisons and inefficient bit manipulations
@temyurchenko temyurchenko merged commit 9d66d67 into develop Dec 19, 2021
@temyurchenko temyurchenko deleted the murcake/optimize-array-load branch December 19, 2021 16:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants