📄 dhry.c
字号:
* Intel 310AP 80286-8Mhz Xenix 3.0 cc 1893 2009
* VAX 11/785 - UNIX 5.2 cc 2083 2083
* VAX 11/785 - VMS VAX-11 C 2.0 2083 2083
* VAX 11/785 - UNIX SVR2 cc 2123 2083
* VAX 11/785 - ULTRIX-32 1.1 cc 2083 2091
* VAX 11/785 - UNIX 4.3bsd cc 2135 2136
* WICAT PB 68000-12.5Mhz System V WICAT C 4.1 1780 2233 S~
* Pyramid 90x - OSx 2.3 cc 2272 2272
* Pyramid 90x FPA,cache,4Mb OSx 2.5 cc no -O 2777 2777
* Pyramid 90x w/cache OSx 2.5 cc w/-O 3333 3333
* IBM-4341-II - VM/SP3 Waterloo C 1.2 3333 3333
* IRIS-2400T 68020-16.67Mhz UNIX System V cc 3105 3401
* Celerity C-1200 ? UNIX 4.2BSD cc 3485 3468
* SUN 3/75 68020-16.67Mhz SUN 4.2 V3 cc 3333 3571
* IBM-4341 Model 12 UTS 5.0 ? 3685 3685
* SUN-3/160 68020-16.67Mhz Sun 4.2 V3.0A cc 3381 3764
* Sun 3/180 68020-16.67Mhz Sun 4.2 cc 3333 3846
* IBM-4341 Model 12 UTS 5.0 ? 3910 3910 MN
* MC 5400 68020-16.67MHz RTU V3.0 cc (V4.0) 3952 4054
* Intel 386/20 80386-12.5Mhz PMON debugger Intel C386v0.2 4149 4386
* NCR Tower32 68020-16.67Mhz SYS 5.0 Rel 2.0 cc 3846 4545
* MC 5600/5700 68020-16.67MHz RTU V3.0 cc (V4.0) 4504 4746 %
* Intel 386/20 80386-12.5Mhz PMON debugger Intel C386v0.2 4534 4794 i1
* Intel 386/20 80386-16Mhz PMON debugger Intel C386v0.2 5304 5607
* Gould PN9080 custom ECL UTX-32 1.1C cc 5369 5676
* Gould 1460-342 ECL proc UTX/32 1.1/c cc 5342 5677 G1
* VAX-784 - Mach/4.3 cc 5882 5882 &4
* Intel 386/20 80386-16Mhz PMON debugger Intel C386v0.2 5801 6133 i1
* VAX 8600 - UNIX 4.3bsd cc 7024 7088
* VAX 8600 - VMS VAX-11 C 2.0 7142 7142
* Alliant FX/8 CE Concentrix cc -ce;exec -c 6952 7655 FX
* CCI POWER 6/32 COS(SV+4.2) cc 7500 7800
* CCI POWER 6/32 POWER 6 UNIX/V cc 8236 8498
* CCI POWER 6/32 4.2 Rel. 1.2b cc 8963 9544
* Sperry (CCI Power 6) 4.2BSD cc 9345 10000
* CRAY-X-MP/12 105Mhz COS 1.14 Cray C 10204 10204
* IBM-3083 - UTS 5.0 Rel 1 cc 16666 12500
* CRAY-1A 80Mhz CTSS Cray C 2.0 12100 13888
* IBM-3083 - VM/CMS HPO 3.4 Waterloo C 1.2 13889 13889
* Amdahl 470 V/8 UTS/V 5.2 cc v1.23 15560 15560
* CRAY-X-MP/48 105Mhz CTSS Cray C 2.0 15625 17857
* Amdahl 580 - UTS 5.0 Rel 1.2 cc v1.5 23076 23076
* Amdahl 5860 UTS/V 5.2 cc v1.23 28970 28970
*
* NOTE
* * Crystal changed from 'stock' to listed value.
* + This Macintosh was upgraded from 128K to 512K in such a way that
* the new 384K of memory is not slowed down by video generator accesses.
* % Single processor; MC == MASSCOMP
* NM A version 7 C compiler written at New Mexico Tech.
* @ vanilla Lattice compiler used with MicroPro standard library
* S Shorts used instead of ints
* T with Chris Torek's patches (whatever they are).
* ~ For WICAT Systems: MB=MultiBus, PB=Proprietary Bus
* LM Large Memory Model. (Otherwise, all 80x8x results are small model)
* MM Medium Memory Model. (Otherwise, all 80x8x results are small model)
* C1 Univation PC TURBO Co-processor; 9.54Mhz 8086, 640K RAM
* C2 Seattle Telecom STD-286 board
* C3 Definicon DSI-32 coprocessor
* C? Unknown co-processor board?
* CT1 Convergent Technologies MegaFrame, 1 processor.
* MN Using Mike Newtons 'optimizer' (see net.sources).
* G1 This Gould machine has 2 processors and was able to run 2 dhrystone
* Benchmarks in parallel with no slowdown.
* FH FHC == Frank Hogg Labs (Hazelwood Uniquad 2 in an FHL box).
* FX The Alliant FX/8 is a system consisting of 1-8 CEs (computation
* engines) and 1-12 IPs (interactive processors). Note N8 applies.
* RT This is one of the RT's that CMU has been using for awhile. I'm
* not sure that this is identical to the machine that IBM is selling
* to the public.
* i1 Normally, the 386/20 starter kit has a 16k direct mapped cache
* which inserts 2 or 3 wait states on a write thru. These results
* were obtained by disabling the write-thru, or essentially turning
* the cache into 0 wait state memory.
* Nnn This machine has multiple processors, allowing "nn" copies of the
* benchmark to run in the same time as 1 copy.
* &nn This machine has "nn" processors, and the benchmark results were
* obtained by having all "nn" processors working on 1 copy of dhrystone.
* (Note, this is different than Nnn. Salesmen like this measure).
* ? I don't trust results marked with '?'. These were sent to me with
* either incomplete info, or with times that just don't make sense.
* ?? means I think the performance is too poor, ?! means too good.
* If anybody can confirm these figures, please respond.
*
* ABBREVIATIONS
* CCC Concurrent Computer Corp. (was Perkin-Elmer)
* MC Masscomp
*
*--------------------------------RESULTS END----------------------------------
*
* The following program contains statements of a high-level programming
* language (C) in a distribution considered representative:
*
* assignments 53%
* control statements 32%
* procedure, function calls 15%
*
* 100 statements are dynamically executed. The program is balanced with
* respect to the three aspects:
* - statement type
* - operand type (for simple data types)
* - operand access
* operand global, local, parameter, or constant.
*
* The combination of these three aspects is balanced only approximately.
*
* The program does not compute anything meaningfull, but it is
* syntactically and semantically correct.
*
*/
#include <stdio.h>
#include <string.h>
#pragma warning disable = 135, 98, 47, 35
#define CPU80166
#ifdef CPU8051
extern void initserial (void);
#define HZ 125L /* 125 Interrupt per Second for time function */
#define LOOPS 200L
#endif
#ifdef CPU80166
extern void initserial (void);
#define HZ 2500000L /* 2 5000 000 Hz Timer input frequency */
#define LOOPS 200L
#endif
/* Accuracy of timings and human fatigue controlled by next two lines */
#ifndef LOOPS
#define LOOPS 50000 /* Use this for slow or 16 bit machines */
/* #define LOOPS 500000 */ /* Use this for faster machines */
#endif
/* Compiler dependent options */
#define NOENUM /* Define if compiler has no enum's */
#undef NOSTRUCTASSIGN /* Define if compiler can't assign structures */
/* define only one of the next two defines */
/* #define TIMES */ /* Use times(2) time function */
#define TIME /* Use time(2) time function */
/* define the granularity of your times(2) function (when used) */
#ifndef HZ
/*#define HZ 60 /* times(2) returns 1/60 second (most) */
#define HZ 1 /* times(2) returns 1/100 second (WECo) */
#endif
/* for compatibility with goofed up version */
/*#define GOOF */ /* Define if you want the goofed up version */
#ifdef GOOF
const unsigned char Version[] = "1.0";
#else
const unsigned char Version[] = "1.1";
#endif
#ifdef NOSTRUCTASSIGN
#define structassign(d, s) memcpy(&(d), &(s), sizeof(d))
#else
#define structassign(d, s) d = s
#endif
#ifdef NOENUM
#define Ident1 1
#define Ident2 2
#define Ident3 3
#define Ident4 4
#define Ident5 5
typedef unsigned char Enumeration;
#else
typedef enum {Ident1, Ident2, Ident3, Ident4, Ident5} Enumeration;
#endif
typedef int OneToThirty;
typedef int OneToFifty;
typedef unsigned char CapitalLetter;
typedef unsigned char String30[31];
typedef int Array1Dim[51];
typedef int Array2Dim[51][51];
struct Record
{
struct Record *PtrComp;
Enumeration Discr;
Enumeration EnumComp;
OneToFifty IntComp;
String30 StringComp;
};
typedef struct Record RecordType;
typedef RecordType * RecordPtr;
typedef int boolean;
#ifndef NULL
#define NULL 0
#endif
#define TRUE 1
#define FALSE 0
#ifndef REG
#define REG register
#endif
/* extern Enumeration Func1(); */
#ifdef TIMES
#include <sys/types.h>
#include <sys/times.h>
#endif
/*
* Package 1
*/
int IntGlob;
boolean BoolGlob;
unsigned char Char1Glob;
unsigned char Char2Glob;
Array1Dim Array1Glob;
Array2Dim Array2Glob;
RecordPtr PtrGlb;
RecordPtr PtrGlbNext;
RecordType rec1, rec2;
Enumeration Func1(CharPar1, CharPar2)
CapitalLetter CharPar1;
CapitalLetter CharPar2;
{
REG CapitalLetter CharLoc1;
REG CapitalLetter CharLoc2;
CharLoc1 = CharPar1;
CharLoc2 = CharLoc1;
if (CharLoc2 != CharPar2)
return (Ident1);
else
return (Ident2);
}
boolean Func2(StrParI1, StrParI2)
String30 StrParI1;
String30 StrParI2;
{
REG OneToThirty IntLoc;
REG CapitalLetter CharLoc;
IntLoc = 1;
while (IntLoc <= 1)
if (Func1(StrParI1[IntLoc], StrParI2[IntLoc+1]) == Ident1)
{
CharLoc = 'A';
++IntLoc;
}
if (CharLoc >= 'W' && CharLoc <= 'Z')
IntLoc = 7;
if (CharLoc == 'X')
return(TRUE);
else
{
if (strcmp(StrParI1, StrParI2) > 0)
{
IntLoc += 7;
return (TRUE);
}
else
return (FALSE);
}
}
boolean Func3(EnumParIn)
REG Enumeration EnumParIn;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -