Skip to content
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

Mark auto derived functions #495

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Mark auto derived functions #495

merged 1 commit into from
Oct 29, 2024

Conversation

wcampbell0x2a
Copy link
Collaborator

@wcampbell0x2a wcampbell0x2a commented Oct 27, 2024

Closes #491

* Add automatically_derived to all impl functions in deku-derive
* Motivation: rust-lang/rust#120185
Copy link

Benchmark for 4d7dbc9

Click to view benchmark
Test Base PR %
count_from_u8_specialize 94.7±2.04ns 91.8±4.33ns -3.06%
count_no_specialize 2.4±0.02µs 2.4±0.02µs 0.00%
count_specialize 95.4±1.35ns 94.9±1.49ns -0.52%
deku_read_bits 1199.1±18.67ns 1207.0±16.13ns +0.66%
deku_read_byte 4.7±0.35ns 5.0±0.07ns +6.38%
deku_read_enum 3.8±0.07ns 4.1±0.03ns +7.89%
deku_read_vec 30.2±0.61ns 30.1±0.19ns -0.33%
deku_write_bits 188.7±6.15ns 192.4±4.26ns +1.96%
deku_write_byte 25.8±0.52ns 25.8±0.56ns 0.00%
deku_write_enum 24.0±0.96ns 23.9±0.24ns -0.42%
deku_write_vec 429.8±4.85ns 425.2±22.08ns -1.07%
read_all 4.9±0.03µs 4.2±0.06µs -14.29%
read_all_bytes 4.2±0.06µs 4.8±0.05µs +14.29%

Copy link
Owner

@sharksforarms sharksforarms left a comment

Choose a reason for hiding this comment

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

cool!

@wcampbell0x2a wcampbell0x2a merged commit b3be1e3 into master Oct 29, 2024
13 of 15 checks passed
@wcampbell0x2a wcampbell0x2a deleted the mark-auto-derived branch October 29, 2024 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mark #[automatically_derived] for generated impls
2 participants