How do I maximize the CPU usage for my application? I tried setting it to "Real-time" in the Task Manager, but there was no noticeable improvement - it's stuck at 50%.
I'm working in Windows XP with Visual C++ 2005.
I'm assuming you running on a dual-core computer. Try starting another thread.
If you only have one thread of execution in your application, it can only be run on one CPU core at a time. The solution to this is to divide the work in half, and get one CPU core to run one half and the other core to run the other half. Of course you might want to generalize this to work with 4 cores or more....
Setting the priority for your application is only going to move it up the queue for which process gets first chance to use the CPU. If there is a real-time process waiting for the CPU, it will always get it before a high priority, and so on down the priority list. Even if your app is low priority, it can still max out a CPU core if it has enough work to do, and no higher-priority process is wanting to use that core.
For an introduction to multithreading, check out these questions: