aboutsummaryrefslogtreecommitdiffstats
path: root/src/benchmarks/eo/eo_bench_callbacks.c
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-11-01 21:57:43 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2015-11-01 21:57:43 -0200
commitfa88a2337f4c1ed74dbe5f8e9b8ab9e80aa94215 (patch)
tree289d1f0e30abe7aeb9100ab9ed3e3a755d1c18b7 /src/benchmarks/eo/eo_bench_callbacks.c
parentEo do: use the __thread directive when available to manage call stack. (diff)
downloadefl-fa88a2337f4c1ed74dbe5f8e9b8ab9e80aa94215.tar.gz
Eo: Partial implementation to remove eo_dodevs/felipealmeida/eo_optimisations
Diffstat (limited to 'src/benchmarks/eo/eo_bench_callbacks.c')
-rw-r--r--src/benchmarks/eo/eo_bench_callbacks.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/benchmarks/eo/eo_bench_callbacks.c b/src/benchmarks/eo/eo_bench_callbacks.c
index fde611eea1..eac192572b 100644
--- a/src/benchmarks/eo/eo_bench_callbacks.c
+++ b/src/benchmarks/eo/eo_bench_callbacks.c
@@ -17,11 +17,12 @@ static void
bench_eo_callbacks_add(int request)
{
int i;
- Eo *obj = eo_add(SIMPLE_CLASS, NULL);
+ Eo *obj;
+ eo_add(obj, SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
- eo_do(obj, eo_event_callback_priority_add(SIMPLE_FOO, (short) i, _cb, NULL));
+ eo_event_callback_priority_add(obj, SIMPLE_FOO, (short) i, _cb, NULL);
}
eo_unref(obj);
@@ -50,14 +51,15 @@ bench_eo_callbacks_call(int request)
const int len = EINA_C_ARRAY_LENGTH(distribution);
int i, j;
- Eo *obj[len] = { 0 };
+ Eo *obj[len];
for (i = 0 ; i < len ; i++)
{
- obj[i] = eo_add(SIMPLE_CLASS, NULL);
+ ///obj[i];
+ eo_add(obj[i], SIMPLE_CLASS, NULL);
for (j = 0 ; j < i ; j++)
{
- eo_do(obj[i], eo_event_callback_priority_add(SIMPLE_FOO, (short) j, _cb, NULL));
+ eo_event_callback_priority_add(obj[i], SIMPLE_FOO, (short) j, _cb, NULL);
}
}
@@ -66,7 +68,7 @@ bench_eo_callbacks_call(int request)
for (j = 0 ; j < (int) (distribution[i] * request) ; j++)
{
/* Miss finding the callbacks on purpose, so we measure worst case scenario. */
- eo_do(obj[i], eo_event_callback_call(SIMPLE_BAR, NULL));
+ eo_event_callback_call(obj[i], SIMPLE_BAR, NULL);
}
}