admin管理员组文章数量:1356825
I decided to use std::views
stuff because of their bound-safety and readability. It looks like std::views::take_while
invokes too many function calls and recomputes the same thing over and over again. This looks like a performance nightmare to me.
I thought the new std::views::cache_latest
would be a solution, but testing my code with GCC (trunk) and Clang (trunk) showed otherwise.
In the following, std::views::take_while()
invokes its lambda 68 times!
本文标签: cWhy does stdviewstakewhile() do so many function invocations (even with cachelatest)Stack Overflow
版权声明:本文标题:c++ - Why does std::views::take_while() do so many function invocations? (even with `cache_latest`) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744071889a2586040.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论