Getting rid of for loops?

Code, algorithms, languages, construction...
thevinenator
Posts: 68
Joined: Tue Jun 02, 2015 11:02 pm
Real Name: Vince

Re: Getting rid of for loops?

Post by thevinenator » Sat Feb 18, 2017 9:45 pm

I develop using MSVS 2013. I'm using the express version at home but have the professional version at work. I didn't like that they took out the profiling from the express version, but when I need to profile I just compile and run the code at work.

I set the optimization settings to be:

Maximize Speed (/02)
(inline) expand any suitable functions (/Ob2)
Enable Intrinsic functions (/Oi)
Favor fast code (/Ot)
and whole program optimization (/GL)

that seems to work best for me.

I don't there is a (/O3) options for MSVS.
"An Engine's strength flows from the Search. But beware, pruning, extensions, reductions; the dark side of the Search are they. Once you start down the dark path, it will dominate and consume you, as it has to so many developers before.” -- Yoda

notachessplayer
Posts: 30
Joined: Thu Dec 29, 2016 10:13 pm

Re: Getting rid of for loops?

Post by notachessplayer » Sun Feb 19, 2017 3:21 am

I've got the same config as you.

There's the O/x option, but doesn't seem to do anything more than O/2 according to the results.

I tried the GCC compiler again, with the given options, it's a little faster than before, but still slower than visual studio. I also tried the intel compiler, also slower.

notachessplayer
Posts: 30
Joined: Thu Dec 29, 2016 10:13 pm

Re: Getting rid of for loops?

Post by notachessplayer » Mon Feb 20, 2017 6:49 pm

I've been playing a bit with the intel compiler, and it is actually better than the microsoft one (it might only be for an intel processor though).
I've gone from 978ms (diff code) to 950ms. Maybe not a huge difference, but I think it's worth its weight.

So, as far as I'm concerned: GCC < MS < Intel

Just wanted to let you know!

Post Reply