Absolutely weird speedup...

Started by
1 comment, last by RuneLancer 18 years, 10 months ago
This is quite odd, and has me COMPLETELY stumped. I used to have a 2D array in my game holding polygone data. All in all it was obviously just test material. So, I figured I'd get rid of that today and put my data in a dynamic 1D array that would use whatever space it needs instead of something ugly and hardcoded. Being a good lil' programmer, I fired up some music and set to work. Took a couple of minutes and I gave it a test run. My framerate was suddently much higher than before. Which is surprising: it shouldn't be THAT much of an improvement... Surely the overhead was not so great as to nearly double my framerate! I switch off my music and ponder for a few moments. Then I run it again and I'm hitting normal speeds. Huh. Isolated incident? No. Music goes back on to resume work, speed goes back up. Didn't take me too long to realise what was doing it. Thing is, I'm totally stumped. How the hell can this be? Seriously, what the fuck?!
Advertisement
Using a 1D could give you a speedup if before you were jumping through the 2D array randomly (not sequentially).

As for the music thing, I remember that using VB6 with DX8/8.1 speed would improve if you had Windows Media Player open in the background. I dunno the cause and cant remember the details of it (few years ago).

what languages are you using and what exactly is your program doing? running in debug/release, etc?

hth
Hehe, you just described exactly what's happening: I had media player running in the background and things suddently ran much faster. I really doubt it's the array, because I was going through it sequentially using a for() loop.

It's in C++ and the version I'm running right now is in debug mode. I haven't tested with release yet. It uses OpenGL, however, and not DirectX.

Well, I'm glad to know I'm not insane yet (it's only 1 am! :( ) though I'm still really curious as to what the cause is...

This topic is closed to new replies.

Advertisement