bug in testLinkedList.cpp

linkedList.h better than std::list but NOT that much better.
Look at diffs for test/testLinkedListAux for bug:
This commit is contained in:
Marty Kraimer
2010-11-23 07:58:54 -05:00
parent 9db054cc54
commit fdfd11c755
5 changed files with 21 additions and 21 deletions

View File

@@ -294,7 +294,7 @@ static void testTime(FILE *auxFd) {
}
endTime.getCurrent();
double diff = TimeStamp::diff(endTime,startTime);
diff /= 1000.0;
diff *= 1000.0;
fprintf(auxFd,"diff %f milliSeconds\n",diff);
diff = diff/1000.0; // convert from milliseconds to seconds
diff = diff/ntimes; // seconds per outer loop

View File

@@ -1,20 +1,20 @@
Time test
diff 0.000025 milliSeconds
time per iteration 0.000025 microseconds
time per addTail/removeHead 0.000000 microseconds
diff 25.093909 milliSeconds
time per iteration 25.093909 microseconds
time per addTail/removeHead 0.012547 microseconds
Time test locked
diff 186.459567 milliSeconds
time per iteration 186.459567 microseconds
time per addTail/removeHead 0.093230 microseconds
diff 176.854724 milliSeconds
time per iteration 176.854724 microseconds
time per addTail/removeHead 0.088427 microseconds
Time ArrayList test
diff 652.028489 milliSeconds
time per iteration 652.028489 microseconds
time per addTail/removeHead 0.326014 microseconds
diff 651.776054 milliSeconds
time per iteration 651.776054 microseconds
time per addTail/removeHead 0.325888 microseconds
Time ArrayList test locked
diff 799.889631 milliSeconds
time per iteration 799.889631 microseconds
time per addTail/removeHead 0.399945 microseconds
diff 808.411295 milliSeconds
time per iteration 808.411295 microseconds
time per addTail/removeHead 0.404206 microseconds

View File

@@ -1 +1 @@
time per call 36.953844 microseconds
time per call 23.580658 microseconds

View File

@@ -1 +1 @@
current 1290514910 631889964 milliSec 1290514910631
current 1290516873 809711508 milliSec 1290516873809

View File

@@ -1,6 +1,6 @@
one requested 0.400000 diff 0.400227 seconds
two requested 0.200000 diff 0.200181 seconds
one requested 0.200000 diff 0.200259 seconds
two requested 0.400000 diff 0.400413 seconds
one requested 0.000000 diff 0.000058 seconds
two requested 0.000000 diff 0.000082 seconds
one requested 0.400000 diff 0.400214 seconds
two requested 0.200000 diff 0.200183 seconds
one requested 0.200000 diff 0.200328 seconds
two requested 0.400000 diff 0.400277 seconds
one requested 0.000000 diff 0.000038 seconds
two requested 0.000000 diff 0.000060 seconds