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

Support arbitrary enum discriminant #452

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wcampbell0x2a
Copy link
Collaborator

  • Add support for arbitrary enum discriminant
  • Remove support for defining both id = 1 and having a discriminant
  • Made DekuRead/DekuWrite Id const if possible

Closes #306

* Add support for arbitrary enum discriminant
* Remove support for defining both `id = 1` and having a discriminant
* Made DekuRead/DekuWrite Id const if possible

Closes #306
Copy link

Benchmark for 9d3ece1

Click to view benchmark
Test Base PR %
deku_read_bits 1258.8±9.31ns 1223.8±24.98ns -2.78%
deku_read_byte 3.3±0.09ns 3.5±0.06ns +6.06%
deku_read_enum 2.5±0.07ns 2.7±0.06ns +8.00%
deku_read_vec 33.3±0.35ns 33.8±0.23ns +1.50%
deku_write_bits 167.0±6.57ns 168.0±3.12ns +0.60%
deku_write_byte 22.9±0.50ns 22.7±0.37ns -0.87%
deku_write_enum 21.4±0.30ns 21.1±0.21ns -1.40%
deku_write_vec 402.4±3.79ns 387.4±4.37ns -3.73%

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.

Support arbitrary_enum_discriminant
1 participant