德莱斯通 (Déláisītōng)
Dhrystone

原始链接: https://en.wikipedia.org/wiki/Dhrystone

## Dhrystone 基准测试:摘要 Dhrystone 基准测试由 Reinhold Weicker 于 1984 年开发,是一种合成基准测试,旨在评估整数处理性能——作为以浮点运算为重点的 Whetstone 的对应物。Weicker 分析了 FORTRAN 和 Pascal 等语言中常见的编程结构,创建了一个代表典型系统编程任务的程序。 最初因其 Unix 平台的 C 版本而流行,Dhrystone 以“每秒 Dhrystones”来衡量性能——其核心循环的迭代次数。虽然很有价值,但其简单性使其容易受到编译器优化的影响,从而夸大分数。2.0 和 2.1 版本试图对抗这些技术,但挑战依然存在。 尽管存在诸如尺寸小和可能过度代表字符串操作等局限性,Dhrystone 仍然有用,尤其是在嵌入式系统中,由于其侧重于完成的迭代次数而非指令计数,因此比原始 MIPS 提供了更有意义的比较。结果通常表示为 DMIPS(Dhrystone MIPS)或 DMIPS/MHz,用于频率归一化的比较。然而,更新的基准测试,如 CoreMark 和 SPECint,正日益被用于更全面的评估。

黑客新闻 新的 | 过去的 | 评论 | 提问 | 展示 | 工作 | 提交 登录 Dhrystone (wikipedia.org) 36 分,来自 krelian 22 小时前 | 隐藏 | 过去的 | 收藏 | 2 条评论 ghaff 19 小时前 | 下一个 [–] 那已经是很久以前的事了。我记得在我的小型计算机时代,Dhrystones 曾经被吹捧为相关的指标。回复 jimnotgym 15 小时前 | 上一个 [–] > “Dhrystone”这个名字是另一个基准算法“Whetstone”的双关语。 我通常喜欢一个好的双关语。我想知道这个名字有什么独特的属性让我感到不舒服。回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Computer benchmarking program

Dhrystone is a synthetic computing benchmark program developed in 1984 by Reinhold P. Weicker intended to be representative of system (integer) programming. The Dhrystone grew to become representative of general processor (CPU) performance. The name "Dhrystone" is a pun on a different benchmark algorithm called Whetstone, which emphasizes floating point performance.[1]

With Dhrystone, Weicker gathered meta-data from a broad range of software, including programs written in FORTRAN, PL/1, SAL, ALGOL 68, and Pascal. He then characterized these programs in terms of various common constructs: procedure calls, pointer indirections, assignments, etc. From this he wrote the Dhrystone benchmark to correspond to a representative mix. Dhrystone was published in Ada, with the C version for Unix developed by Rick Richardson ("version 1.1") greatly contributing to its popularity.

Dhrystone vs. Whetstone

[edit]

The Dhrystone benchmark contains no floating point operations, thus the name is a pun on the then-popular Whetstone benchmark for floating point operations. The output from the benchmark is the number of Dhrystones per second (the number of iterations of the main code loop per second).

Both Whetstone and Dhrystone are synthetic benchmarks, meaning that they are simple programs that are carefully designed to statistically mimic the processor usage of some common set of programs. Whetstone, developed in 1972, originally strove to mimic typical Algol 60 programs based on measurements from 1970, but eventually became most popular in its Fortran version, reflecting the highly numerical orientation of computing in the 1960s.

Issues addressed by Dhrystone

[edit]

Dhrystone's eventual importance as an indicator of general-purpose ("integer") performance of new computers made it a target for commercial compiler writers. Various modern compiler static code analysis techniques (such as elimination of dead code: for example, code which uses the processor but produces internal results which are not used or output) make the use and design of synthetic benchmarks more difficult. Version 2.0 of the benchmark, released by Weicker and Richardson in March 1988, had a number of changes intended to foil a range of compiler techniques. Yet it was carefully crafted so as not to change the underlying benchmark. This effort to foil compilers was only partly successful. Dhrystone 2.1, released in May of the same year, had some minor changes and as of July 2010[update] remains the current definition of Dhrystone.

Other than issues related to compiler optimization, various other issues have been cited with the Dhrystone. Most of these, including the small code size and small data set size, were understood at the time of its publication in 1984. More subtle is the slight over-representation of string operations, which is largely language-related: both Ada and Pascal have strings as normal variables in the language, whereas C does not, so what was simple variable assignment in reference benchmarks became buffer copy operations in the C library. Another issue is that the score reported does not include information which is critical when comparing systems such as which compiler was used, and what optimizations.

Dhrystone remains remarkably resilient as a simple benchmark, but its continuing value in establishing true performance is questionable. It is easy to use, well documented, fully self-contained, well understood, and can be made to work on almost any system. In particular, it has remained in broad use in the embedded computing world, though the recently developed EEMBC benchmark suite, the CoreMark standalone benchmark, HINT, Stream, and even Bytemark are widely quoted and used, as well as more specific benchmarks for the memory subsystem (Cachebench), TCP/IP (TTCP), and many others.

Dhrystone may represent a result more meaningfully than MIPS (million instructions per second) because instruction count comparisons between different instruction sets (e.g. RISC vs. CISC) can confound simple comparisons. For example, the same high-level task may require many more instructions on a RISC machine, but might execute faster than a single CISC instruction. Thus, the Dhrystone score counts only the number of program iteration completions per second, allowing individual machines to perform this calculation in a machine-specific way. Another common representation of the Dhrystone benchmark is the DMIPS (Dhrystone MIPS) obtained when the Dhrystone score is divided by 1757 (the number of Dhrystones per second obtained on the VAX 11/780, nominally a 1 MIPS machine).

Another way to represent results is in DMIPS/MHz, where DMIPS result is further divided by CPU frequency, to allow for easier comparison of CPUs running at different clock rates. This is effectively an architecture-neutral version of instructions per cycle.

Using Dhrystone as a benchmark has pitfalls:

  • It features unusual code that is not usually representative of modern programs.[2]
  • It is susceptible to compiler optimizations. For example, it does a lot of string copying in an attempt to measure string copying performance. However, the strings in Dhrystone are of known constant length and their starts are aligned on natural boundaries, two characteristics usually absent from real programs. Therefore, an optimizer can replace a string copy with a sequence of word moves without any loops, which will be much faster. This optimization consequently overstates system performance, sometimes by more than 30%.[3]
  • Dhrystone's small code size may fit in the instruction cache of a modern CPU, so that instruction fetch performance is not rigorously tested.[2] Similarly, Dhrystone may also fit completely in the data cache, thus not exercising data cache miss performance. To counter fits-in-the-cache problem, the SPECint benchmark was created in 1988 to include a suite of (initially 8) much larger programs (including a compiler) which could not fit into L1 or L2 caches of that era.
联系我们 contact @ memedata.com