0
(0)

ベンチマーク系のソースを自宅整理していたら、Dhrystone benchmark 2.1 (August 17, 1988) ソースが出てきたので Cygwin x64 環境で実施しました。

どこから得たのか覚えていないのですが、ググってみたら

http://www.sapid.org/html2/GENERAL/TestSuite.pdf このへんだったかな?
→ 日本語ページ: http://www.sapid.org/index-ja.html (これを見たことはないので別のサイトだったかも)

 

■ベンチマーク実施環境

– make 実施日時 2011/10/02 (日曜)午前6時。
なんとなく目覚めたときにベンチマーク採取したくなってw

– Cygwin
CYGWIN_NT-6.1-WOW64 dev-PC1 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin

– gcc
gcc version 4.3.4 20090804 (release) 1 (GCC)

 

※cygwin 上で動作する as is を置いておきます。

https://www.fxfrog.com/dhrystone.zip

中身は dhrystone.exe と Readme です。

バイナリは上記環境で生成したもので不具合がないことを、ほかの Cygwin x64 環境で確認済みです。

 

===

■1.まずは Readmeを読む (内容は as is でよろしく)
This floppy disk contains the source code of the Dhrystone benchmark
(version 2.1) in three languages:
Files containing the Ada version (*.s: Specifications, *.b: Bodies): d_global.s d_main.b d_pack_1.b d_pack_1.s d_pack_2.b d_pack_2.s (The file names have been abbreviated to 8 characters plus extension for MS-DOS)
Files containing the C version (*.h: Header File, *.c: C Modules) dhry.h dhry_1.c dhry_2.c
File containing the Pascal version: dhry.p
The file RATIONALE contains the article "Dhrystone Benchmark: Rationale for Version 2 and Measurement Rules"
which has been published, together with the C source code (Version 2.0),
in SIGPLAN Notices vol. 23, no. 8 (Aug. 1988), pp. 49-62.
This article explains all changes that have been made for Version 2,
compared with the version of the original publication
in Communications of the ACM vol. 27, no. 10 (Oct. 1984), pp. 1013-1030.
It also contains "ground rules" for benchmarking with Dhrystone
which should be followed by everyone who uses the program and publishes
Dhrystone results.
Compared with the Version 2.0 published in SIGPLAN Notices, Version 2.1
contains a few corrections that have been made after Version 2.0 was
distriobuted over the UNIX network Usenet. These small differences between
Version 2.0 and 2.1 should not affect execution time measurements.
For those who want to compare the exact contents of both versions,
the file "dhry_c.dif" contains the differences between the two versions,
as generated by a file comparison of the corresponding files with the
UNIX utility "diff".
Recipients of this floppy disk who perform measurements are asked
to send measurement results to the author and/or to Rick Richardson.
Rick Richardson publishes regularly Dhrystone results on the UNIX network
Usenet. For submissions of results to him (preferably by electronic mail,
see address in the program header), he has provided a form which is contained
in the file "submit.frm".
August 17, 1988 Reinhold P. Weicker Siemens AG, E STE 35 Postfach 3240 D-8520 Erlangen Germany (West) Phone: [xxx-49]-9131-7-20330 (8-17 Central European Time) Usenet: ..!mcvax!unido!estevax!weicker
ーーー
■ 2.次に makefile の確認。コンパイルオプションは -O は標準のようで、そのまま変更せずに使います。
なお、gcc は 前述通り version 4.3.4 20090804 (release) 1 (GCC) 使用しています。
CC = cc
OPT = -O
CFLAGS = $(OPT)
OBJS = dhry_1.o dhry_2.o
BINDIR = /usr/local/bin

dhrystone: $(OBJS)
$(CC) $(OPT) -o dhrystone $(OBJS)

install: dhrystone
cp dhrystone $(BINDIR)
strip $(BINDIR)/dhrystone

clean:
rm -f dhrystone *.o core *~

dhry_1.c: dhry.h
dhry_2.c: dhry.h

FreeBSD:
make OPT=’$(OPT) -static’ dhrystone

NEWSOS4:
make OPT=’$(OPT) -DBSD’ dhrystone

NEWSOS6:
make OPT=’$(OPT) -Bstatic’ dhrystone

HPUX10optc: dhrystone

HPUX10hpc:
make CC=hpcc dhrystone
ーーー
■ 3.生成された dhrystone を確認しましょう(日曜の朝6時にビルドw)

dhrystone
dhrystone
ーーー
■ 4.では実行しましょう。
カレントパスからの実行、計算回数は 500,000 (実際には +10回の 500,010回 計算実施される)
計算結果: Ptr_Comp: 12059256 should be: (implementation-dependent)
ー 実行結果キャプチャ画像も紹介します。↓

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

投稿者 斉藤之雄 (Yukio Saito)

Global Information and Communication Technology OTAKU / Sports volunteer / Social Services / Master of Technology in Innovation for Design and Engineering, AIIT / BA, Social Welfare, NFU / twitter@yukio_saitoh