Unless you are not from Earth then I would be amazed if you haven’t heard about several global warming and carbon this and carbon that discussions and I was thinking, could assembler save the planet?
I write Java most of the time and it is suitable for what I use it for and the performance appears good. However, the other day I was looking back at some of the assembler I have written and running it and example programs from the MASM forum and the speed of these programs blew me away. I have a very fast CPU (Intel Core 2 Duo (E6850)) but this is the same CPU that I run most of my Java tools and programs on during development. The speed difference is so noticeable that I looked closer.
The tests and analysis was rough and ready and therefore I wont be publishing results, since that isn’t really the point of this rant. The point is that we no longer try to get every last drop of performance out of the CPU’s we have because it is now cheaper to add another machine or buy another CPU than it is to optimize the code. This appears to me as the same consumerism and resource squandering that has put the planet into the problems it is in now.
If we write programs to be super fast and do more with less CPU cycles, then we need less cooling and less power and therefore less of the things that cause global warming. The best way that I know to get the most out of a CPU is to use Assembler and get as close to the metal as possible.
So Assembler CAN save the planet !!