Skip to content

Improve DekuUpdate#415

Open
wcampbell0x2a wants to merge 1 commit intomasterfrom
improve-update
Open

Improve DekuUpdate#415
wcampbell0x2a wants to merge 1 commit intomasterfrom
improve-update

Conversation

@wcampbell0x2a
Copy link
Collaborator

@wcampbell0x2a wcampbell0x2a commented Jan 24, 2024

Improve DekuUpdate

- Add ctx to DekuUpdate::update.
- Add attribute update_ctx to send ctx to update function
- Add attribute update_also to propagate update to nested struct/enums
- Add attribute update_with to call a custom update function

See #409, #369

@github-actions
Copy link
Contributor

Benchmark for e64a9e4

Click to view benchmark
Test Base PR %
deku_read_bits 1182.9±16.00ns 1265.0±14.41ns +6.94%
deku_read_byte 20.2±0.11ns 20.2±0.29ns 0.00%
deku_read_enum 9.4±0.04ns 9.3±0.11ns -1.06%
deku_read_vec 53.9±0.59ns 53.2±0.67ns -1.30%
deku_write_bits 110.1±2.30ns 109.7±0.97ns -0.36%
deku_write_byte 129.5±3.29ns 124.4±3.86ns -3.94%
deku_write_enum 97.9±2.74ns 90.7±4.39ns -7.35%
deku_write_vec 3.1±0.04µs 3.1±0.05µs 0.00%

@github-actions
Copy link
Contributor

Benchmark for a800851

Click to view benchmark
Test Base PR %
count_from_u8_specialize 97.8±1.13ns 97.3±0.97ns -0.51%
count_no_specialize 2.8±0.01µs 2.4±0.01µs -14.29%
count_specialize 99.0±0.88ns 98.2±0.70ns -0.81%
deku_read_bits 1269.1±16.92ns 1260.8±37.53ns -0.65%
deku_read_byte 4.9±0.06ns 4.5±0.10ns -8.16%
deku_read_enum 4.5±0.13ns 4.1±0.02ns -8.89%
deku_read_vec 30.9±0.46ns 31.0±0.51ns +0.32%
deku_write_bits 238.1±4.55ns 228.7±3.91ns -3.95%
deku_write_byte 24.0±0.28ns 24.0±0.36ns 0.00%
deku_write_enum 22.5±0.32ns 22.5±0.38ns 0.00%
deku_write_vec 513.2±10.41ns 487.1±6.74ns -5.09%
read_all 5.2±0.04µs 4.2±0.07µs -19.23%
read_all_bytes 5.2±0.17µs 4.2±0.06µs -19.23%

- Add ctx to DekuUpdate::update.
- Add attribute update_ctx to send ctx to update function
- Add attribute update_also to propagate update to nested struct/enums
- Add attribute update_with to call a custom update function
@wcampbell0x2a wcampbell0x2a changed the title Draft: Improve DekuUpdate Improve DekuUpdate Feb 11, 2026
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.

1 participant