BYTE.com
RSS feed

Newsletter
Free E-mail Newsletter from BYTE.com
Email Address
First Name
Last Name




 
    
             
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
Dr. Dobb's Media Center
BYTE.com Store

BYTE CD-ROM
NOW, on one CD-ROM, you can instantly access more than 8 years of BYTE.
 
The Best of BYTE: Volume 2 - Heuristic Algorithms
The Best of BYTE: Volume 2 - Heuristic Algorithms
In this volume of Best of BYTE, we explore the emergence of some heuristic algorithms. Although we have only scratched the surface of this intriguing subject, we hope we've suggested the potential of the synthesis of heuristics and algorithms.

© 2008 Think Services, Privacy Policy, Terms of Service, United Business Media Limited
Site comments: webmaster@byte.com
Web Sites: BYTE.com, dotnetjunkies.com, Dr. Dobb's Journal, SD Expo, Sys Admin, sqljunkies.com, Unixreview



MarketPlace
Try Numara FootPrints 9, The ITSM software that Delivers Real Value, Flexibility and Results.
Sign Up & Get Full Access To The Definitive Online Book Collection With SkillSoft's Books24x7�.
Fast online exception analysis. Capture customer crash data online.
One Stop to Buy All Your Business IT Solutions. Browse Through Dell's Best Deals Online Now!
Understand C/C++ code in less time. A new team member ? Inherited legacy code ? Get up to speed faster with Crystal Flow for C/C++. Code-formatting improves readability. Flowcharts are integrated with code browser. Export flowcharts to Visio.
Wanna see your ad here?
 

web2