BYTE.com > Features > 2003
The Tortoise and the Hare
By Tuomo Kortesmaa
July 28, 2003
(The Tortoise and the Hare
: Page 1 of 1 )
Can a 566 MHz Celeron outrace a 2.4 GHz Pentium 4? The answer is not, as you might think: "Of course not, how can you even ask something like that?" It is: Generally speaking no, but it depends. This "depends" needs more explanation.
In the past a new processor was faster than an old one in the same processor family. The 100 MHz Pentium was faster than the 20 MHz i386 for sure. It did not matter what (correct) binary core image we were running.
So it was a big surprise to me to find out that my new Pentium 4 computer with 2.4 GHz clock speed and fast memory is sometimes much slower than my old Celeron 566 MHz with slow memory, even with no floating point calculations or disk traffic involved.
It seems that this is the first time, at least with Intel processors, when we can't simply say that a new generation is faster. To be faster on average and in most cases is, of course, enough for an average application and an average user. However, there is also a question about the principle of clock speed we have been relying on so far.
I found this odd phenomenon by accident when running my own compact microkernel, which I wrote about seven years ago for the i386 protected mode architecture. It was made only for teaching and demonstration purposes. It has been running faster and faster with new generations of Intel CPUs, like the i486 and old Pentium models. Now it's slower by a lot! My kernel source is available at http://www.evitech.fi/~tk/; it is the file wbs.tar.gz.
Benchmarking
I tried to understand the reason for the performance discrepancy and did some simple benchmarking. I had some guesses at the reason behind the slowdown.
The following C program runs 17 percent slower on my Pentium 4 computer than on my Celeron computer:
int main(void) { /* getpid() only returns the number of the running process */
long int i; /* The idea is to get a big proportion of */
for(i=0;i<30000000L;i++)getpid(); /* system calls to "usual intructions " */
}
I got the running time from the operating system by calling the test program as the parameter to the Linux command time.
Page 1 of 1
BYTE.com > Features > 2003
|