Change a little bit the benchmarks to be more representative.
This commit is contained in:
1 parent
671c600b05
commit
54a3a4cd9c
6 files changed
+20
-11
No files matched your search
+4
-4
@@ -94,7 +94,7 @@ static void test_rbtree(size_t n)
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
tree.insert(rand_get());
|
||||
}
|
||||
|
||||
rand_init();
|
||||
unsigned int s = 0;
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
set<unsigned long>::iterator it = tree.find(rand_get());
|
||||
@@ -115,7 +115,7 @@ test_dict1(unsigned long n)
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
dict[rand_get()] = rand_get();
|
||||
}
|
||||
|
||||
rand_init();
|
||||
unsigned int s = 0;
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
map<unsigned long, unsigned long>::iterator it = dict.find(rand_get());
|
||||
@@ -136,7 +136,7 @@ test_dict2(unsigned long n)
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
dict[rand_get()] = rand_get();
|
||||
}
|
||||
|
||||
rand_init();
|
||||
unsigned int s = 0;
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
unordered_map<unsigned long, unsigned long>::iterator it = dict.find(rand_get());
|
||||
@@ -178,7 +178,7 @@ test_dict_big(unsigned long n)
|
||||
sprintf(s2.a, "%u", rand_get());
|
||||
dict[s1] = s2;
|
||||
}
|
||||
|
||||
rand_init();
|
||||
unsigned int s = 0;
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
char_array_s s1;
|
||||
|
||||
Reference in new issue
Block a user