fix bench

This commit is contained in:
kimchy 2011-06-17 01:19:12 +03:00
parent 2e64edd4e7
commit dfed1b947e
1 changed files with 4 additions and 4 deletions

View File

@ -76,10 +76,10 @@ public class StringMapAdjustOrPutBenchmark {
if (REUSE) {
iMap.clear();
} else {
map = new TObjectIntHashMap<String>();
iMap = new TObjectIntCustomHashMap<String>(new StringIdentityHashingStrategy());
}
for (long i = 0; i < PUT_OPERATIONS; i++) {
iMap = new TObjectIntCustomHashMap<String>(new StringIdentityHashingStrategy());
iMap.adjustOrPutValue(values[(int) (i % NUMBER_OF_KEYS)], 1, 1);
}
}
stopWatch.stop();
@ -93,10 +93,10 @@ public class StringMapAdjustOrPutBenchmark {
if (REUSE) {
iMap.clear();
} else {
map = new TObjectIntHashMap<String>();
iMap = new TObjectIntCustomHashMap<String>(new IdentityHashingStrategy<String>());
}
for (long i = 0; i < PUT_OPERATIONS; i++) {
iMap = new TObjectIntCustomHashMap<String>(new IdentityHashingStrategy<String>());
iMap.adjustOrPutValue(values[(int) (i % NUMBER_OF_KEYS)], 1, 1);
}
}
stopWatch.stop();