From ee711720964905a34fd78669f2f3e996287c8d33 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Sat, 6 Apr 2019 10:22:38 +0200 Subject: there seems to be some cache preload involved? --- test/monniaux/binary_search/binary_search.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/monniaux/binary_search') diff --git a/test/monniaux/binary_search/binary_search.c b/test/monniaux/binary_search/binary_search.c index 73e77a6c..8cc6f565 100644 --- a/test/monniaux/binary_search/binary_search.c +++ b/test/monniaux/binary_search/binary_search.c @@ -58,12 +58,13 @@ int main () { random_ascending_fill(buf, n); timestamp0 = get_current_cycle()-timestamp0; + my_bsearch(buf, n, v); cycle_t timestamp1 = get_current_cycle(); index pos1 = my_bsearch(buf, n, v); timestamp1 = get_current_cycle()-timestamp1; cycle_t timestamp2 = get_current_cycle(); - index pos2 = my_bsearch(buf, n, v); + index pos2 = my_bsearch2(buf, n, v); timestamp2 = get_current_cycle()-timestamp2; printf("position1: %d\n" -- cgit