Wow lot of really helpful feedback.
0r0d, I'm compiling in MinGW, then running it there. "./a 10000000" etc.
Calculating prime numbers with memoization
I'm not really familiar with MinGW. What level of optimizations do you specify when compiling?
0r0d, I'm compiling in MinGW, then running it there. "./a 10000000" etc.
It's not really important... it's just that I noticed when I made my change, in the debug build it made a big difference in performance, but much smaller gains in release. I'm building using Visual Studio, with the default debug/release configuration. Since you said it ran "a lot faster", I was just wondering if you were testing using debug compile settings... which is never a good idea, but is easy to forget when you're doing quick performance testing. =)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement