Commit 5e44572
optimize mp_drop (extract f from the struct to benefit from memoization)
compiler | gcc-12 | clang-15
before | 0:00.48s - 192464K | 0:00.48s - 154480K
after | 0:00.43s - 172472K | 0:00.46s - 150404K
```cpp
template<class L> struct f { template<class I> using g = mp_drop<L, I>; };
template<class I, class L = mp_iota<I>> using test = mp_transform<f<L>::template g, L>;
using r1 = mp_transform<test, mp_iota_c<50>>;
```1 parent efa2a7b commit 5e44572
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
336 | 337 | | |
337 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
| |||
0 commit comments