Dual core CPU, .NET & Threads

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

Hi
I am writing an application for a client that (mostly) have dual core
desktop machines.

I have a DB query that returns a large amount of data that I will then
need to manipulate on the client side.

What I would like to know is whether it is possible to split my data
into 2, and then start two threads to do the manipulation.

Will .Net/Windows XP automatically assign each thread to a different
core, thus substantially decreasing the time that is taken to
manipulate the data? I.e. will it work (almost) twice as fast?

Thanks
Kevin
 
Kevin said:
Hi
I am writing an application for a client that (mostly) have dual core
desktop machines.

I have a DB query that returns a large amount of data that I will then
need to manipulate on the client side.

What I would like to know is whether it is possible to split my data
into 2, and then start two threads to do the manipulation.

Will .Net/Windows XP automatically assign each thread to a different
core, thus substantially decreasing the time that is taken to
manipulate the data? I.e. will it work (almost) twice as fast?

It is likely, but not definite. Windows will schedule threads as efficently
as it can, but there is no guarentee that you will always get both threads
running at once. However, for heavy computations it'll likely increase your
speed assuming there are no other issues and its pretty likely both will run
simultaneously. I'd recommend splitting it and seeing how it goes.
 
Back
Top