summaryrefslogtreecommitdiff
path: root/legacy/eina/src/tests/eina_bench_hash.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2008-08-11 16:30:16 +0000
committerCedric BAIL <cedric.bail@free.fr>2008-08-11 16:30:16 +0000
commit43cc2dca6f7532bf438b1183a409a2ee852397d9 (patch)
tree2eaa19f7df177b50eca95c3b863eb929483f59c6 /legacy/eina/src/tests/eina_bench_hash.c
parentea0fb7d1b5f6942c9d841effb2096f9c4d3816b5 (diff)
Add first try for an accessor and iterator API, comment welcome (lack inlist and list currently).
Rewrite EINA_ARRAY_ITER_NEXT, still fast, need one more parameter, but no more EINA_ARRAY_ITER_END. SVN revision: 35438
Diffstat (limited to '')
-rw-r--r--legacy/eina/src/tests/eina_bench_hash.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/legacy/eina/src/tests/eina_bench_hash.c b/legacy/eina/src/tests/eina_bench_hash.c
index 5b8e119818..ee9dd86a18 100644
--- a/legacy/eina/src/tests/eina_bench_hash.c
+++ b/legacy/eina/src/tests/eina_bench_hash.c
@@ -31,6 +31,7 @@ eina_bench_lookup_superfast(int request)
31 Eina_Hash *hash = NULL; 31 Eina_Hash *hash = NULL;
32 Eina_Array *array = NULL; 32 Eina_Array *array = NULL;
33 int *tmp_val; 33 int *tmp_val;
34 Eina_Array_Iterator it;
34 unsigned int i; 35 unsigned int i;
35 36
36 array = eina_array_new(1000); 37 array = eina_array_new(1000);
@@ -66,9 +67,8 @@ eina_bench_lookup_superfast(int request)
66 67
67 eina_hash_free(hash); 68 eina_hash_free(hash);
68 69
69 EINA_ARRAY_ITER_NEXT(array, i, tmp_val) 70 EINA_ARRAY_ITER_NEXT(array, i, tmp_val, it)
70 free(tmp_val); 71 free(tmp_val);
71 EINA_ARRAY_ITER_END;
72 72
73 eina_array_free(array); 73 eina_array_free(array);
74} 74}
@@ -79,6 +79,7 @@ eina_bench_lookup_djb2(int request)
79 Eina_Hash *hash = NULL; 79 Eina_Hash *hash = NULL;
80 Eina_Array *array = NULL; 80 Eina_Array *array = NULL;
81 int *tmp_val; 81 int *tmp_val;
82 Eina_Array_Iterator it;
82 unsigned int i; 83 unsigned int i;
83 84
84 array = eina_array_new(1000); 85 array = eina_array_new(1000);
@@ -114,9 +115,8 @@ eina_bench_lookup_djb2(int request)
114 115
115 eina_hash_free(hash); 116 eina_hash_free(hash);
116 117
117 EINA_ARRAY_ITER_NEXT(array, i, tmp_val) 118 EINA_ARRAY_ITER_NEXT(array, i, tmp_val, it)
118 free(tmp_val); 119 free(tmp_val);
119 EINA_ARRAY_ITER_END;
120 120
121 eina_array_free(array); 121 eina_array_free(array);
122} 122}
@@ -127,6 +127,7 @@ eina_bench_lookup_djb2_inline(int request)
127 Eina_Hash *hash = NULL; 127 Eina_Hash *hash = NULL;
128 Eina_Array *array = NULL; 128 Eina_Array *array = NULL;
129 int *tmp_val; 129 int *tmp_val;
130 Eina_Array_Iterator it;
130 unsigned int i; 131 unsigned int i;
131 132
132 array = eina_array_new(1000); 133 array = eina_array_new(1000);
@@ -164,9 +165,8 @@ eina_bench_lookup_djb2_inline(int request)
164 165
165 eina_hash_free(hash); 166 eina_hash_free(hash);
166 167
167 EINA_ARRAY_ITER_NEXT(array, i, tmp_val) 168 EINA_ARRAY_ITER_NEXT(array, i, tmp_val, it)
168 free(tmp_val); 169 free(tmp_val);
169 EINA_ARRAY_ITER_END;
170 170
171 eina_array_free(array); 171 eina_array_free(array);
172} 172}