Commit dca736e
committed
perf:
Extend the Arc::ptr_eq fast-path from #7398 to cover the remaining
Arc-containing DType variants. List and FixedSizeList hold a bare
Arc<DType> in the enum variant, so the shortcut is applied in DType's
manual PartialEq impl. StructFields already handles its own Arc::ptr_eq
internally.
The mismatch arms enumerate every variant in the first position so that
adding a new DType variant produces a non-exhaustive match compile error.
DuckDB StatPopGen full-suite apmc measurement for vortex, averaged over
two runs:
- Cycles: -5.4% (5,973M → 5,651M)
- Instructions: -15.3% (15,491M → 13,121M)
- L1D_CACHE_MISS_LD: -0.8% (56.2M → 55.7M)
- MAP_STALL: -0.2% (1,347M → 1,344M)
Signed-off-by: Alexander Droste <alexander.droste@protonmail.com>Arc::ptr_eq short-circuit for List and FixedSizeList DType equality1 parent d4e7dca commit dca736e
2 files changed
Lines changed: 39 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9166 | 9166 | | |
9167 | 9167 | | |
9168 | 9168 | | |
9169 | | - | |
| 9169 | + | |
9170 | 9170 | | |
9171 | 9171 | | |
9172 | 9172 | | |
| |||
9216 | 9216 | | |
9217 | 9217 | | |
9218 | 9218 | | |
9219 | | - | |
9220 | | - | |
9221 | 9219 | | |
9222 | 9220 | | |
9223 | 9221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
109 | 146 | | |
110 | 147 | | |
111 | 148 | | |
| |||
0 commit comments