Random code speed up?
Blitz3D Forums/Blitz3D Programming/Random code speed up?
| ||
Hi, I have a program that processes allot of pixels using Read/Write Pixelfast. The speed is constant but sometimes I run it and it processes twice as fast? Is there a reason? is it due to memory usage? I want it to run at that speed all the time! |
| ||
sometimes I run it and it processes twice as fast That'll be cos the virus' on your computer are on a down cycle |
| ||
I'd suggest to run something like ProcessExplorer: http://www.microsoft.com/technet/sysinternals/processesandthreads/processexplorer.mspx This will show you clearly what processes are eating how much CPU power. Probably there is a background task, virus or not. Could be defrag, or antivirus scan. It could also be some kind of weird bug in your code, EG when you are waiting for Vsync on even days only - accidently :) There was also the "nibble adress boost" we disconvered some time ago, a FOR loop was significantly faster if its branch label was set on an even, or on a nibble adress (address divideable trough 16). But it wasn't 50% faster, only about 10 or 15 or so. And it also required recompilation with an altered version of the code. |
| ||
Thanks, there is nothing eating the CPU and I can compile and run the code lots of times and then it suddenly runs faster? I will try it on another computer and see it the same thing happens |
| ||
Sorry off subject but is Island storm a dead project because it was very cool, i see that your working on short films now? |
| ||
The obvious question, which we should have asked already, is are you accidently turning Debug on and Off? Im afraid I dont know what the shortcut for Debug is in B3D, so I dont how likly this would be. (Butif it was F4 (say), then I would be pressing it by accident quite often) |
| ||
I am not using debug and yes I have not worked on Island Storm for ages. I will release the code and editor when I get time to remove the purchased media. |