Tools.h++ Manual
104011 Tandem Computers Incorporated 21-11
21
Program output:
Testing string "A 22 character string."
Borland C++ V3.0 Large memory model.
Borland hashing string "A 22 character string."
Iterations: 163
Inner loop operations: 1000
Total operations: 163000
Elapsed (user) time: 4.945055
Kilo-operations per second: 32.962222
Borland C++ V3.0 Large memory model.
Tools.h++ hashing string "A 22 character string."
Iterations: 417
Inner loop operations: 1000
Total operations: 417000
Elapsed (user) time: 4.835165
Kilo-operations per second: 86.243182
String string(cs);// Subtract out constructor time
hashValueType h;
while(n--){ /* No-op */ }
}
void TestRWCString::idleLoop(unsigned long n){
RWCString string(cs);// Subtract out constructor time
unsigned h;
while(n--){ /* No-op */ }
}
Code Example 21-1 (3 of 3)