Skip to content

perf(macros): use #[sails_rs::event] macro to generate encoding code for event, remove runtime BTreeMaps #954

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

vobradovich
Copy link
Member

Resolves #941 .

Current results

before
[counter_add_low_level_works] Handle Gas:     1583071209, Size: 115278

`event` with_optimized_event_encode
[counter_add_low_level_works] Handle Gas:     1311507851, Size: 98099

remove alloc in `service` ExposureContext, use Cell
[counter_add_low_level_works] Handle Gas:     1231227779, Size: 85923

@vobradovich vobradovich self-assigned this Jun 9, 2025
@vobradovich vobradovich added rust Pull requests that update Rust code perf labels Jun 9, 2025
@vobradovich vobradovich marked this pull request as ready for review June 10, 2025 11:52
@vobradovich vobradovich requested review from techraed and breathx June 10, 2025 11:52
/// See [`Cell`] for details.
pub(crate) struct SyncCell<T: ?Sized>(Cell<T>);

unsafe impl<T: ?Sized + Sync> Sync for SyncCell<T> {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd follow the idiom and write the clarification for safety of this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

perf(macros): use #[sails_rs::event] macro to generate encoding code for event, remove runtime BTreeMaps
2 participants