OdeToCode IC Logo

Let's Get Threaded

Wednesday, September 13, 2006

Threading. It's the new frontier. At least, that's what all the cool articles say these days.

The premise is that we have these new fangled dual core chips, but our applications aren't taking advantage of all the horsepower available because we don't use enough threads. We need to use more threads, they say. We have to grab those chips by their cores and bend every transistor to the will of our application.

Imagine if your local government doubled the width of all the roads in your area, and car manufacturers followed up by doubling the size of all new cars. Would that be an improvement?

I'd argue that dual core CPUs allow hardware to finally catch up with today's common usage. I have twice as many processes running today as I did in the old days (when Moore's law allowed processes to keep up). I have streaming audio playing while I'm synching a smart phone and an MP3 player. I have a torrent client running at the same time my desktop search engine is indexing and my newsreader is aggregating. I have at least one virtual machine and Outlook running all the time, and in Vista, everyone will have desktop gadgetry doing whiz-bang animations and back flips in a sidebar.

The last thing we need in this scenario is some application to come along and crush all the background work with threads of its own. Most applications just need enough to keep the UI responsive and do a little work in between button clicks.

Share the processor, and your users will thank you.