0

Since g++ already optimizes for loop vectorization with the O3 flag: How to vectorize my loop with g++?

Is it useful at all I try to vectorize my C++ code?

JobHunter69
  • 1,706
  • 5
  • 25
  • 49
  • 1
    no, write clean and simple code and do not try to outsmart your compiler :) – skeller Jun 01 '19 at 22:08
  • I think you are asking if it is useful for you to put in extra work to *try* to optimize your code into a less-readable mess, instead of letting the compiler reliably perform the same -- or sometimes better -- optimizations for you. Is that the gist of your question? – JaMiT Jun 02 '19 at 00:53
  • @JaMiT Yes, I'm wondering if it will always optimize it the same or better – JobHunter69 Jun 02 '19 at 17:00

0 Answers0