https://godbolt.org/g/K1Rkfv Using SSE, loop, and unrolled add v4 functions, GCC generates almost exact same results. VisualC++ not so much.
-
-
Vastauksena käyttäjälle @tloch14
Appears visual studio vectorizes loops well (compare with add_sse), but not when statically unrolling it.
#cplusplus1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjälle @tloch14
Static unrolling often has the perception of performance, but in this case it makes it *way* worse.
1 vastaus 0 uudelleentwiittausta 0 tykkäystä -
Vastauksena käyttäjälle @tloch14
The more I experiment with small mutations to the code, the more visual studio changes. GCC stays the same throughout.
1 vastaus 0 uudelleentwiittausta 1 tykkäys
https://godbolt.org/g/MLNyoM In this case, just adding " = {}" to the vector's members ruins vectorization in visual studio. GCC handles fine.
8.31 - 23. kesäk. 2017
0 vastausta
0 uudelleentwiittausta
0 tykkäystä
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.