"Disclaimer: Copyright, please reprint, do not use for commercial purposes." Contact Box: feixiaoxing @163.com "
There are a lot of CPU performance testing tools on the Internet web site today. This includes a variety of scoring software, but I prefer to dhrystone the software. Said is the software, in fact is three files, respectively, is Dhry.h, dhry_1.c, dhry_2.c. Test standard is also very simple, the key is the unit time to run how many dhrystone, for example, can be measured in accordance with 1s units. Of course, the test is the time you need to enter the estimated number of dhrystone, you can slowly try. In general, if it is a simple embedded CPU, thousands of to tens of thousands of can be, if the average PC CPU, you need millions of to tens of millions of.
Dhry.h files are as follows,[CPP] View plain copy/* **************************************************************************** * * "Dhrystone" Benchmark Program * -------------------- --------- * * version: c, version 2.1 * * File: dhry.h (part 1 of 3) * * Date: May 25, 1988 * * Author: Reinhold P. Weicker * siemens ag, e ste 35 * Postfach 3240 * 8520 Erlangen * Germany (West) * Phone: [xxx-49]-9131-7-20330 * (8-17 central European time)   * usenet: ..! mcvax!unido!estevax!weicker * * Original Version (In ada) published in * "Communications of  THE ACM " vol. 27., no. 10 (oct. 1984), * pp. 1013 - 1030, together with the statistics * on which the distribution of statements etc. is based. * * in this c version, the following C library functions are used: * - strcpy, strcmp (inside the measurement loop) * - printf, scanf (outside the measurement loop) * in addition, Berkeley UNIX system calls "times ()" or "time () " * are used for execution time measurement. for measurements * on other systems, these calls have to be changed. * * Collection of Results: * Reinhold weicker (address see above) and * * Rick Richardson * PC Research. Inc. * 94 Apple Orchard Drive * tinton falls, nj 07724 * Phone: (201) 389-8963 (9-17 est) * usenet: ...! uunet!pcrat!rick * * please send results to Rick Richardson and/or Reinhold Weicker. * complete information should be given on hardware and software used. * Hardware information includes: machine type, cpu, type and size * of caches; for microprocessors: clock frequency, memory speed