As developers, we've been babied over the last decade. In the days of the 286, developers needed to squeeze every ounce of memory and speed out of the computer that they could. However, over the last decade, computers have gotten faster, RAM is cheaper, and compilers are getting better at optimizing than humans are.
Some developers are known to have said something like:
The algorithm will be faster in a year or so as people upgrade their computer.
I have to admit that I've said something like this once or twice in the past. Don't worry, it'll get faster as computers get faster.
The problem is that computers aren't getting faster anymore.
That algorithm that took 30 minutes 5 years ago, and took 5 minutes last year, won't get any better than 5 minutes, even as people upgrade their computers.
I purchased a new desktop PC 3 years ago: 3.2 Ghz Pentium 4.
Today's desktop PCs are still in the 2.0 - 3.5 Ghz range. The difference is that they're putting more cores on the CPU.
A dual- or quad-core CPU is like having 2 or 4 individual processors: each can handle it's own thread pipeline.
What does this mean to me as a developer? It means that unless I start programming using threads and such, my software won't take advantage of the latest and greatest. And one day, it won't even take advantage of the oldest and slowest.
Now, I'm not saying that all software should support multi-core processors. What I'm saying is if your application has some processing which is CPU intensive, and can be split into smaller tasks, then maybe you should be looking at multi-core support.
Some good candidates:
- Games
- Audio/video encoders/decoders
- Servers
- Graphics
- Compilers
Some programmers are lucky. For many web developers, their languages and frameworks in which they work automatically take advantage of multi-core machines.
Some of us, like us lowly C++ desktop application developers, are not so lucky.
I'll go into some details in an upcoming post about some of the tests I did in order to speed up drawing using multiple threads.
Additional Resources