This repository was archived by the owner on Jan 24, 2022. It is now read-only.
Conversation
Contributor
Author
|
What about a new version? Or you think performance will be different and in this place it is more matter? |
Contributor
|
I'm not sure I understod the question. A new version of what? Do you mean upgrading to Solidity 0.6? |
Contributor
Author
|
@frangio I mean I added new commit to handle this 😁 |
Contributor
|
I really like this! I would like someone else to look at it because it's quite critical. |
frangio
reviewed
Mar 10, 2020
Comment on lines
+35
to
+36
| case 0 { revert(add(data, 32), returndatasize) } | ||
| default { return(add(data, 32), returndatasize) } |
Contributor
There was a problem hiding this comment.
A small optimization, although the compiler may catch this too.
Suggested change
| case 0 { revert(add(data, 32), returndatasize) } | |
| default { return(add(data, 32), returndatasize) } | |
| let data_start := add(data, 32) | |
| case 0 { revert(data_start, returndatasize) } | |
| default { return(data_start, returndatasize) } |
I also considered using mload(data) instead of returndatasize but it seems to be more expensive.
Contributor
Author
There was a problem hiding this comment.
I tried mload(data), but tests failed
Contributor
There was a problem hiding this comment.
That's interesting. Did you understand why?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.