Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add field magic support #503

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Add field magic support #503

merged 1 commit into from
Dec 5, 2024

Conversation

wcampbell0x2a
Copy link
Collaborator

@wcampbell0x2a wcampbell0x2a commented Nov 2, 2024

  • Add docs

deku-derive/src/lib.rs Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Nov 2, 2024

Benchmark for ae5d37f

Click to view benchmark
Test Base PR %
count_from_u8_specialize 96.1±0.89ns 96.3±1.54ns +0.21%
count_no_specialize 2.4±0.02µs 2.4±0.03µs 0.00%
count_specialize 97.6±2.59ns 97.3±2.30ns -0.31%
deku_read_bits 1200.3±8.91ns 1176.5±21.89ns -1.98%
deku_read_byte 4.9±0.11ns 4.5±0.08ns -8.16%
deku_read_enum 4.1±0.03ns 3.8±0.07ns -7.32%
deku_read_vec 30.2±0.76ns 30.7±0.84ns +1.66%
deku_write_bits 190.6±7.57ns 192.6±8.08ns +1.05%
deku_write_byte 26.1±0.30ns 26.1±0.51ns 0.00%
deku_write_enum 23.9±0.22ns 23.9±0.53ns 0.00%
deku_write_vec 424.8±9.12ns 428.3±8.14ns +0.82%
read_all 4.4±0.13µs 5.0±0.04µs +13.64%
read_all_bytes 4.9±0.03µs 4.2±0.14µs -14.29%

@wcampbell0x2a wcampbell0x2a changed the title DRAFT: Add field magic support Add field magic support Nov 15, 2024
Copy link

Benchmark for 921c5b7

Click to view benchmark
Test Base PR %
count_from_u8_specialize 116.5±1.80ns 91.7±0.91ns -21.29%
count_no_specialize 2.4±0.03µs 2.6±0.03µs +8.33%
count_specialize 95.8±1.13ns 96.3±1.24ns +0.52%
deku_read_bits 1166.8±15.60ns 1186.8±18.32ns +1.71%
deku_read_byte 4.2±0.04ns 4.7±0.09ns +11.90%
deku_read_enum 3.6±0.04ns 4.7±0.07ns +30.56%
deku_read_vec 30.1±0.20ns 30.3±0.60ns +0.66%
deku_write_bits 191.7±20.13ns 183.9±6.50ns -4.07%
deku_write_byte 26.1±0.50ns 26.3±1.71ns +0.77%
deku_write_enum 23.9±0.31ns 23.9±0.46ns 0.00%
deku_write_vec 446.5±21.24ns 448.0±7.43ns +0.34%
read_all 4.9±0.04µs 5.0±0.04µs +2.04%
read_all_bytes 5.0±0.07µs 5.2±0.24µs +4.00%

Copy link

Benchmark for f2e25c4

Click to view benchmark
Test Base PR %
count_from_u8_specialize 99.1±0.96ns 94.0±1.01ns -5.15%
count_no_specialize 2.4±0.02µs 2.4±0.03µs 0.00%
count_specialize 104.6±1.19ns 97.7±1.39ns -6.60%
deku_read_bits 1190.9±15.94ns 1172.4±13.00ns -1.55%
deku_read_byte 4.2±0.08ns 4.2±0.15ns 0.00%
deku_read_enum 3.6±0.06ns 3.2±0.03ns -11.11%
deku_read_vec 30.1±0.46ns 30.3±1.77ns +0.66%
deku_write_bits 182.7±3.98ns 188.7±11.22ns +3.28%
deku_write_byte 26.1±0.45ns 26.1±0.50ns 0.00%
deku_write_enum 23.9±0.32ns 23.9±0.37ns 0.00%
deku_write_vec 434.0±6.25ns 445.1±8.16ns +2.56%
read_all 5.0±0.07µs 4.2±0.04µs -16.00%
read_all_bytes 5.0±0.03µs 4.2±0.08µs -16.00%

sharksforarms
sharksforarms previously approved these changes Dec 3, 2024
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.

nice

@wcampbell0x2a
Copy link
Collaborator Author

@sharksforarms rebased

Copy link

github-actions bot commented Dec 5, 2024

Benchmark for ceed057

Click to view benchmark
Test Base PR %
count_from_u8_specialize 114.1±1.30ns 99.8±0.71ns -12.53%
count_no_specialize 4.1±0.01µs 2.8±0.10µs -31.71%
count_specialize 109.9±1.19ns 96.8±1.35ns -11.92%
deku_read_bits 1208.8±27.03ns 1180.8±66.54ns -2.32%
deku_read_byte 4.9±0.06ns 4.9±0.05ns 0.00%
deku_read_enum 4.1±0.06ns 4.1±0.05ns 0.00%
deku_read_vec 31.1±1.80ns 30.9±0.92ns -0.64%
deku_write_bits 243.7±4.32ns 234.0±7.31ns -3.98%
deku_write_byte 24.0±0.37ns 23.9±0.58ns -0.42%
deku_write_enum 22.9±0.31ns 22.6±0.31ns -1.31%
deku_write_vec 503.9±13.11ns 494.4±31.37ns -1.89%
read_all 7.6±0.14µs 4.9±0.07µs -35.53%
read_all_bytes 7.5±0.06µs 5.0±0.13µs -33.33%

@wcampbell0x2a wcampbell0x2a merged commit fbaf868 into master Dec 5, 2024
13 of 15 checks passed
@wcampbell0x2a wcampbell0x2a deleted the field-magic branch December 5, 2024 16:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants