Commit a3cf37b
committed
perf: gate PartialEq derive to test builds only
The PartialEq derive was being compiled into release builds even though
it's only used in test code. This caused a 3.33% performance regression
in the du_human_balanced_tree benchmark due to increased binary size
affecting CPU cache efficiency.
Changes:
- stty.rs: Gate PartialEq derive on Flag<T> with #[cfg_attr(test, derive(PartialEq))]
- flags.rs: Gate PartialEq derive on AllFlags enum with #[cfg_attr(test, derive(PartialEq))]
This eliminates the performance regression while keeping all test code
functional and unchanged.1 parent afef0b0 commit a3cf37b
2 files changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
0 commit comments