-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible optimizations in the Heap #64
Comments
Can we close? @QGarchery |
I think we should do them in the basic heap, it should not be too difficult. The arguments against them for the use case of Morpho do not hold in general |
Ok tagging @makcandrov and @Tristan22400 on it |
I'm not in favor of resolving #38 because it will increase gas consumption in general cases to save gas in a rare case where two accounts have the same value. Regarding #36, it is correct that we can make the heap more usable by adding/replacing some functions. Which functions should be added?
I'm in favor of the first two functions, but not the third. |
I don't think we can assume that the rare case is when two accounts have the same value. I understand that there are use cases where indeed accounts should rarely have the same value (and that's why it's not implemented for Morpho, see this comment). But this implementation is meant as a general purpose heap, so we can make no assumption about how it's used. I like the update function: it seems to be lightweight in terms of implementation and would be useful in a lot of cases |
We can also implement:
Originally posted by @QGarchery in #23 (comment)
The text was updated successfully, but these errors were encountered: