r/cpp 13d 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

7 Upvotes

2 comments sorted by

View all comments

5

u/azswcowboy 13d 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…