Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test bench::bench_derive_clone ... bench: 454,318 ns/iter (+/- 11,401) test bench::bench_match_clone ... bench: 183,570 ns/iter (+/- 10,652) test bench::bench_new_clone ... bench: 177,907 ns/iter (+/- 2,234)
- Loading branch information
d5994d5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may be wrong, but I don't think the order of enum variants is guaranteed under
#[repr(Rust)]
(the default). This may have provided a small benefit today, but may be rearranged by the compiler at any point. It may even be affected by how you use the enum whether it rearranges or not. Might be worth checking if#[repr(C)]
can work here.