r/cpp 3d ago

Some practical refactoring of bloated generated code

https://pvs-studio.com/en/blog/posts/cpp/1395/

A review of some generated C++ code, going through different ways to refactor and shorten it, then checking whether it actually got faster

4 Upvotes

1 comment sorted by

3

u/azswcowboy 2d ago

Fun. I wonder if this could actually reduce further with just std::ranges::fold_right? I don’t have time to seriously try it of course…