More Ranges Pleaseencalsupated as ‘lazy ranges’ (views) ■ Algorithms as composable objects - ‘expression templates’ ○ Projections - unary transformations of the ranges we inspect.roi.barkan@gmail.com Composability of Ranges ○ Comparisons (+projections) ○ iter_swap operations. ● Sometimes iter_swap is much more expensive than comparison ○ For example - sorting rows of a table by one column ○ Projections stress the potential permutation with N iter_swap operations ○ Implementation is likely a one-liner using iota() and projections. 24roi.barkan@gmail.com Rabbit 3 - Permutations ● Permutations allow more flexibility, not just0 码力 | 27 页 | 1.08 MB | 6 月前3
Effective Ranges: A tutorial for using C++2X rangeshttps://wg21.link/P2214 8 . 3advice advice always use range algorithms �rst constrained, better errors projections, superior results view adapters �rst don't be evil and write inscrutable pipelines 8 . 4�nal0 码力 | 56 页 | 15.30 MB | 6 月前3
Just-in-Time Compilation - J F Bastien - CppCon 2020compiler compiler is then a compiler interpreter… but I’m getting ahead of myself with Futamura projections. We’ll dive further into this, but this gets us to this talk’s first goal…Goal #1 JiT / AoT is0 码力 | 111 页 | 3.98 MB | 6 月前3
共 3 条
- 1













