4 ms·
> OTOH ranges usually get compiled to faster and more efficient code. Smaller too. than raw loops ? do you have an example ?
by jcelerier 7y ago
> OTOH ranges usually get compiled to faster and more efficient code. Smaller too.
than raw loops ? do you have an example ?
- mangix 7y agoNot particularly. However I do develop on OpenWrt where size is important. On some C++ projects, when I convert the for loops to range based ones using clang-tidy's modernize-loop-convert, I usually get a reduction in compiled size (compiling with -Os of course).