-
Notifications
You must be signed in to change notification settings - Fork 631
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
feat(interpreter): add more helper methods to memory #794
Conversation
|
||
/// Sets the given 32-byte `value` to the memory region at the given `offset`. | ||
/// | ||
/// Panics on out of bounds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Panics on out of bounds. | |
/// # Panics | |
/// | |
/// Panics on out of bounds. |
/// Sets the `byte` at the given `index`. | ||
/// | ||
/// Panics when `index` is out of bounds. | ||
#[inline(always)] | ||
/// Panics on out of bounds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Panics on out of bounds. | |
/// # Panics | |
/// | |
/// Panics on out of bounds. |
|
||
/// Returns a U256 of the memory region at the given offset. | ||
/// | ||
/// Panics on out of bounds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Panics on out of bounds. | |
/// # Panics | |
/// | |
/// Panics on out of bounds. |
|
||
/// Returns a 32-byte slice of the memory region at the given offset. | ||
/// | ||
/// Panics on out of bounds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Panics on out of bounds. | |
/// # Panics | |
/// | |
/// Panics on out of bounds. |
} | ||
} | ||
|
||
/// Returns the byte at the given offset. | ||
/// | ||
/// Panics on out of bounds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Panics on out of bounds. | |
/// # Panics | |
/// | |
/// Panics on out of bounds. |
Jsut to talk about this a little: https://indico.cern.ch/event/386232/sessions/159923/attachments/771039/1057534/always_inline_performance.pdf We do have It seems that the thing with inlining is to always measure |
These would be useful in Foundry.
Second commit reduces usage of inline always since it's almost always unnecessary, and sometimes can hinder performance when normal inline hint is enough.
In release mode in our case performance is the same.