From 2c85e4c18655358319f4f2e7687411aa5ba4bce0 Mon Sep 17 00:00:00 2001 From: garbled Date: Thu, 22 Oct 1998 06:07:24 +0000 Subject: Heapsort benchmark benchmark program for variable sized arrays. --- benchmarks/heapsort/Makefile | 26 ++++++++++++++++++++++++++ benchmarks/heapsort/files/md5 | 3 +++ benchmarks/heapsort/pkg/COMMENT | 1 + benchmarks/heapsort/pkg/DESCR | 15 +++++++++++++++ benchmarks/heapsort/pkg/PLIST | 2 ++ 5 files changed, 47 insertions(+) create mode 100644 benchmarks/heapsort/Makefile create mode 100644 benchmarks/heapsort/files/md5 create mode 100644 benchmarks/heapsort/pkg/COMMENT create mode 100644 benchmarks/heapsort/pkg/DESCR create mode 100644 benchmarks/heapsort/pkg/PLIST (limited to 'benchmarks') diff --git a/benchmarks/heapsort/Makefile b/benchmarks/heapsort/Makefile new file mode 100644 index 00000000000..312b82e2118 --- /dev/null +++ b/benchmarks/heapsort/Makefile @@ -0,0 +1,26 @@ +# $NetBSD: Makefile,v 1.1.1.1 1998/10/22 06:07:24 garbled Exp $ + +DISTNAME= heapsort.c +PKGNAME= heapsort-1.0 +CATEGORIES= benchmarks +MASTER_SITES= ftp://ftp.nosc.mil/pub/aburto/heapsort/ +EXTRACT_SUFX= #empty + +MAINTAINER= root@garbled.net + +NO_WRKSUBDIR= yes + +do-extract: + ${MKDIR} ${WRKSRC} + ${CP} ${DISTDIR}/heapsort.c ${WRKSRC}/heapsort.c + +do-build: + (cd ${WRKSRC} ; cc -O2 -DUNIX -o heapsort heapsort.c -lm) + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/heapsort ${PREFIX}/bin + +benchmark: + -@${WRKSRC}/heapsort + +.include "../../mk/bsd.pkg.mk" diff --git a/benchmarks/heapsort/files/md5 b/benchmarks/heapsort/files/md5 new file mode 100644 index 00000000000..8b03087dda7 --- /dev/null +++ b/benchmarks/heapsort/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 1998/10/22 06:07:24 garbled Exp $ + +MD5 (heapsort.c) = c0623d55d703dc1bbdb1cd46bc637e9e diff --git a/benchmarks/heapsort/pkg/COMMENT b/benchmarks/heapsort/pkg/COMMENT new file mode 100644 index 00000000000..2377bb0ed6d --- /dev/null +++ b/benchmarks/heapsort/pkg/COMMENT @@ -0,0 +1 @@ +benchmark program for variable sized arrays. diff --git a/benchmarks/heapsort/pkg/DESCR b/benchmarks/heapsort/pkg/DESCR new file mode 100644 index 00000000000..5b5e893272b --- /dev/null +++ b/benchmarks/heapsort/pkg/DESCR @@ -0,0 +1,15 @@ +Based on the Heap Sort code in 'Numerical Recipes in C' by William H. +Press, Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling, +Cambridge University Press, 1990, ISBN 0-521-35465-X. + +The MIPS rating is based upon the program run time (runtime) for one +iteration and a gcc 2.1 unoptimized (gcc -DUNIX) assembly dump count of +instructions per iteration for a i486 machine (assuming 80386 code). This +is the reference used. + +The maximum amount of memory allocated is based on the 'imax' variable in +main(). Memory size = (2000*sizeof(long))*2^imax. imax is currently set to +8, but this value may be increased or decreased depending upon your system +memory limits. For standard Intel PC CPU machines a value of imax = 3 must +be used else your system may crash or hang up despite code in the program +to prevent this. diff --git a/benchmarks/heapsort/pkg/PLIST b/benchmarks/heapsort/pkg/PLIST new file mode 100644 index 00000000000..22f98711670 --- /dev/null +++ b/benchmarks/heapsort/pkg/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 1998/10/22 06:07:24 garbled Exp $ +bin/heapsort -- cgit v1.2.3