Repository navigation
Commit 6fd6d9d
committed
Framework: key HIST() names by a fixed-string template argument
HIST()/CONST_STR() created, at every call site, a lambda, a local struct, an
index_sequence expansion over the characters and a ConstStr<'a','b',...> type.
They now produce ConstStr<"ab">: one type per distinct name, the hash still a
static member computed once per name, and concatenation still at the type
level, so names passed as function parameters keep working. Hashes are
unchanged.
2,000 distinct names (a quarter concatenated with a directory) in a template
instantiated twice, -O2: clang 21 3.76 s -> 1.90 s and 591 -> 238 MB peak;
GCC 16 6.41 s -> 3.04 s and 602 -> 366 MB. Object size +6%.
Needs AliceO2Group/O2Physics#18584, which updates the helpers that spelled out
ConstStr<chars...>.1 parent a6674c4 commit 6fd6d9d
3 files changed
Lines changed: 42 additions & 39 deletions
File tree
- Framework/Core
- include/Framework
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
| 132 | + | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
390 | | - | |
| 389 | + | |
| 390 | + | |
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
126 | 140 | | |
127 | | - | |
128 | | - | |
| 141 | + | |
| 142 | + | |
129 | 143 | | |
130 | 144 | | |
131 | 145 | | |
132 | 146 | | |
133 | 147 | | |
134 | 148 | | |
135 | | - | |
136 | | - | |
| 149 | + | |
| 150 | + | |
137 | 151 | | |
138 | 152 | | |
139 | 153 | | |
| |||
142 | 156 | | |
143 | 157 | | |
144 | 158 | | |
145 | | - | |
146 | | - | |
| 159 | + | |
| 160 | + | |
147 | 161 | | |
148 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
149 | 170 | | |
150 | 171 | | |
151 | | - | |
| 172 | + | |
| 173 | + | |
152 | 174 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
| 175 | + | |
158 | 176 | | |
159 | 177 | | |
160 | | - | |
161 | | - | |
| 178 | + | |
162 | 179 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | 180 | | |
167 | 181 | | |
168 | 182 | | |
| |||
187 | 201 | | |
188 | 202 | | |
189 | 203 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
| 204 | + | |
| 205 | + | |
204 | 206 | | |
205 | 207 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
0 commit comments