summaryrefslogtreecommitdiff
path: root/cleanbench.c
diff options
context:
space:
mode:
Diffstat (limited to 'cleanbench.c')
-rw-r--r--cleanbench.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/cleanbench.c b/cleanbench.c
index 47f4466..66e58ed 100644
--- a/cleanbench.c
+++ b/cleanbench.c
@@ -15,13 +15,13 @@ static double getScore(int fid);
enum {
NUMSORT,
- STRINGSORT,
- BITFIELD,
FPEMULATION,
- FOURIER,
- ASSIGNMENT,
IDEA,
HUFFMAN,
+ STRINGSORT,
+ BITFIELD,
+ ASSIGNMENT,
+ FOURIER,
NEURAL,
LINEAR
} tests_t;
@@ -31,13 +31,13 @@ main(int argc, char *argv[])
{
const char* test_name[] = {
"NUMERIC SORT ",
- "STRING SORT ",
- "BITFIELD ",
"FP EMULATION ",
- "FOURIER ",
- "ASSIGNMENT ",
"IDEA ",
"HUFFMAN ",
+ "STRING SORT ",
+ "BITFIELD ",
+ "ASSIGNMENT ",
+ "FOURIER ",
"NEURAL NET ",
"LU DECOMPOSITION"
};
@@ -48,13 +48,13 @@ main(int argc, char *argv[])
*/
const double bindex[] = {
38.993, /* Numeric sort */
- 2.238, /* String sort */
- 5829704, /* Bitfield */
2.084, /* FP Emulation */
- 879.278, /* Fourier */
- 0.2628, /* Assignment */
65.382, /* IDEA */
36.062, /* Huffman */
+ 2.238, /* String sort */
+ 5829704, /* Bitfield */
+ 0.2628, /* Assignment */
+ 879.278, /* Fourier */
0.6225, /* Neural Net */
19.3031 /* LU Decomposition */
};
@@ -66,13 +66,13 @@ main(int argc, char *argv[])
*/
const double linux_bindex[] = {
118.73, /* Numeric sort */
- 14.459, /* String sort */
- 27910000, /* Bitfield */
9.0314, /* FP Emulation */
- 1565.5, /* Fourier */
- 1.0132, /* Assignment */
220.21, /* IDEA */
112.93, /* Huffman */
+ 14.459, /* String sort */
+ 27910000, /* Bitfield */
+ 1.0132, /* Assignment */
+ 1565.5, /* Fourier */
1.4799, /* Neural Net */
26.732 /* LU Decomposition */
};
@@ -91,7 +91,7 @@ main(int argc, char *argv[])
" : : Pentium 90 : AMD K6/233\n"
"--------------------:------------------:-------------:------------");
- for (test = NUMSORT; test < NUMTESTS; test++) {
+ for (test = 0; test < NUMTESTS; test++) {
printf("%s :", test_name[test]);
if (!bench_with_confidence(test, &bmean, &bstdev, &bnumrun)) {
@@ -101,12 +101,12 @@ main(int argc, char *argv[])
}
printf(" %15.5g : %9.2f : %9.2f\n", bmean, bmean / bindex[test], bmean / linux_bindex[test]);
- if ((test == FOURIER) || (test == NEURAL) || (test == LINEAR)) {
+ if (test >= FOURIER) {
fpindex *= bmean / bindex[test];
linux_fpindex *= bmean / linux_bindex[test];
} else {
intindex *= bmean / bindex[test];
- if ((test == NUMSORT) || (test == FPEMULATION) || (test == IDEA) || (test == HUFFMAN)) {
+ if (test <= HUFFMAN) {
linux_intindex *= bmean / linux_bindex[test];
} else {
linux_memindex *= bmean / linux_bindex[test];
@@ -120,7 +120,7 @@ main(int argc, char *argv[])
"==============================LINUX DATA BELOW===============================\n",
pow(intindex, .142857), pow(fpindex, .33333));
hardware();
-#include "sysinfoc.c"
+#include "sysinfo.c"
printf( "MEMORY INDEX : %.3f\n"
"INTEGER INDEX : %.3f\n"
"FLOATING-POINT INDEX: %.3f\n"
@@ -154,13 +154,13 @@ static int bench_with_confidence(int benchmark,
{
void (*funcpointer[])(void) =
{ DoNumSort,
- DoStringSort,
- DoBitops,
DoEmFloat,
- DoFourier,
- DoAssign,
DoIDEA,
DoHuffman,
+ DoStringSort,
+ DoBitops,
+ DoAssign,
+ DoFourier,
DoNNET,
DoLU };
@@ -280,13 +280,13 @@ return FALSE;
static double getScore(int benchmark) {
double (*getScore[])(void) = {
getNumSortScore,
- getStringSortScore,
- getBitfieldScore,
getEmFloatScore,
- getFourierScore,
- getAssignmentScore,
getIDEAScore,
getHuffmanScore,
+ getStringSortScore,
+ getBitfieldScore,
+ getAssignmentScore,
+ getFourierScore,
getNNETScore,
getLinearScore
};