How to utilize my computation resources.
Posted
by carter-boater
on Stack Overflow
See other posts from Stack Overflow
or by carter-boater
Published on 2010-04-01T02:41:42Z
Indexed on
2010/04/01
2:43 UTC
Read the original article
Hit count: 431
Hi all,
I wrote a program to solve a complicated problem. This program is just a c# console application and doesn't do console.write until the computation part is finished, so output won't affect the performance. The program is like this:
static void Main(string[] args)
{
Thread WorkerThread = new Thread(new ThreadStart(Run), StackSize);
WorkerThread.Priority = ThreadPriority.Highest;
WorkerThread.Start();
Console.WriteLine("Worker thread is runing...");
WorkerThread.Join();
}
Now it takes 3 minute to run, when I open my task manager, I see it only take 12% of the cpu time. I actually have a i7 intel cpu with 6G three channel DDR3 memory. I am wondering how I can improve the utilization of my hardware.
Thanks a lot
© Stack Overflow or respective owner