The thing inside of us that makes us go up is our attitude.

Thoughts and learnings

Random Image

Who's Online

We have 7 guests online

Statistics

Members : 2
Content : 182
Web Links : 6
Content View Hits : 191663



Dhrystone and Whetstone PDF Print E-mail
Written by Chandra Kumar R   


Dhrystone and whetstone are open source synthetic benchmark programs. These benchmarks are used in the following cases:

  • to measure and compare the performance of two different processors
  • to measure the performance of compilers for a processor


What is benchmark?

Benchmark is the standard based on which the performance is measured. Benchmarking is the act of measuring the performance of a system against a standard.

Benchmark programs are the set of programs which are used to assess the relative performance of a system. The benchmark programs are written such that they impose a particular type of workload on a system. And provide the metrics on the system performance for the workload imposed.

One way of writing the benchmark program is to first take the statistics of all the operations from various application program. Then, get the proportion of each operation and write the program based on the derived proportion. Thus created benchmark programs are called synthetic benchmark programs.


Dhrystone

Dhrystone is the indicator of integer arithmetic performance. It stresses the ALU. Dhrystone doesn't contain any floating point operations. The name dhrystone is a pun on the name of another benchmark program "whetstone" (which is for floating point operations).

Dhrystone measures the performance in "Dhrystone per second". "Dhrystone per second" implies the number of times the program can run in a second.

Dhrystone doesn't provide the result in number of instructions per second. There is reason. Assume a task say 'x'. In a RISC machine, to accomplish this tasks it requires 2 instructions. Whereas the CISC machine requires 1 instruction. But the task 'x' is done faster in RISC machine than the CISC machine. So, here the performance measure in instruction count fails. Hence dhrystone performs the calculation in a machine specific way (of counting the number of program completion per second).

The main drawback of dhrystone is in most cases it is not the representation of the real-life programs. Also Dr. Reinhold Weicker who created Dhrystone says that “Although the Dhrystone benchmark that I published in 1984 was useful at the time, it cannot claim to be useful for modern workloads and CPUs because it is so short, it fits in on‐chip caches, and fails to stress the memory system. Also, because it is so short and does not read from an input file, special compiler optimizations can benefit Dhrystone performance more than normal program performance.”

 

Download: c source of dhrystone


Whetstone

Whetstone is the indicator of floating point arithmetic performance. It stresses the FPU. Whetstone measures the performance in MWIPS (Million Whetstone Instructions Per Second). Whetstone is named after the town Whetstone in England where it was designed.

Whetstone mostly contains the floating point data and operations. In general, whetstone can be defined as the mix of operations that are typically performed in scientific applications.

The drawback of whetstone is, it doesn't show-up the advantages of architectures such as RISC. This is because, most of the variables in whetstone are global. Whereas, the large amount of processor registers that are available with RISC architectures would get exploited only for handling the local variables.

 

Download: c source of whetstone.c


References:

  1. http://en.wikipedia.org/wiki/Dhrystone
  2. http://www.johnloomis.org/NiosII/dhrystone/ECLDhrystoneWhitePaper.pdf
  3. http://dhrystone-benchmark.downloadaces.com
  4. http://www.dell.com/downloads/global/products/pedge/en/guide_to_server_benchmarks.pdf
  5. http://www.keil.com/benchmarks/whetstone.asp
  6. http://www.cse.dmu.ac.uk/~bb/Teaching/ComputerSystems/SystemBenchmarks/BenchMarks.html#whetstone
  7. http://homepage.virgin.net/roy.longbottom/whetstone.htm
  8. http://homepage.virgin.net/roy.longbottom/whetstone.pdf