I've been running a single-threaded brute force version of the famous Traveling Salesman Problem, and YourKit is pinpointing me the fact that the CPU is being used at 25%, at most.
What's the reason behind that fact? We've been told that these kind of algorithms are highly CPU intensive, yet there seems to be a lot of wasted CPU in this case.
My theory is the bottleneck must be the RAM access. Locking issues seem to be out of question, as the algorithm I'm running is single-threaded.
Am I right?
Promoting comment to answer.
You say your program is single-threaded, but you're only using 25% CPU.
That's an indication that you have a quad-core machine. (or perhaps dual-core with Hyper-Threading) With a single-thread, you cannot use more than 1 core.
So what you're seeing is normal.
As a side point, bottlenecks such as locking and memory access do not directly decrease your CPU usage. A single-threaded program that spends the whole time cache missing will still show the same 25% usage (on quad-core) as one that is running real computation.
In multi-threaded applications, CPU usage could be affected if such bottlenecks block other threads from running or if they affect load-balance.