6 ms·
> MSVC compiler doesn't do SROA, as far as I know. In the future, consider verifying your extraordinary claims. Of course it does, and it took me about two min
by whitequark_ 10y ago
> MSVC compiler doesn't do SROA, as far as I know.
In the future, consider verifying your extraordinary claims. Of course it does, and it took me about two minutes to demonstrate that: https://godbolt.org/g/9kT1NP https://godbolt.org/g/9kT1NP
- galacticpony 10y ago"As far as I know" implies that I might not know, so that's not an extraordinary claim. You haven't actually verified SROA. The scalar replacement didn't kick in for the non-inlined method, so this could be a result of loop-specific optimizations. The code is also far from optimal, but that's besides your point of course. Also note that you're testing an RC of the latest version. There's a feature request for SROA from 2013, so it may be implemented by now: https://connect.microsoft.com/VisualStudio/feedback/details/804315/msvc-implement-sra-optimization https://connect.microsoft.com/VisualStudio/feedback/details/...