From adcc369478f5e9fea6bd00f119257eea3f8d4fb1 Mon Sep 17 00:00:00 2001 From: Tyge Løvset <60263450+tylo-work@users.noreply.github.com> Date: Mon, 23 Mar 2020 21:21:25 +0100 Subject: Add files via upload --- benchmark.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'benchmark.cpp') diff --git a/benchmark.cpp b/benchmark.cpp index 38f76b8c..7564820c 100644 --- a/benchmark.cpp +++ b/benchmark.cpp @@ -107,14 +107,17 @@ int main() MAP_TEST2(RMAP, ii) printf("ix entry size %llu\n", sizeof(CMapEntry_ix)); - + CVector_s names = cvector_initializer; cvector_s_push(&names, cstring_make("Robert")); cvector_s_push(&names, cstring_make("Johnny")); cvector_s_push(&names, cstring_make("Anne")); cvector_s_push(&names, cstring_make("Ruth")); cvector_s_push(&names, cstring_make("Burt")); - + + size_t res = cvector_s_find(names, cstring_tmp1k("Ruth")); + printf("found %llu\n", res); + cvector_s_sort(&names); c_foreach (i, cvector_s, names) printf("%s\n", i.item->str); -- cgit v1.2.3