summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-03-24 07:41:00 +0100
committerGitHub <[email protected]>2020-03-24 07:41:00 +0100
commite8e38fcfa593552f70b6f7c229b459c136ae4e01 (patch)
treeb6c287dd88559b1c7379a5aff2184fd47a06bdcf
parent8cb520acb31cfe210c65b0b33b7d4082ae8fd28a (diff)
downloadSTC-modified-e8e38fcfa593552f70b6f7c229b459c136ae4e01.tar.gz
STC-modified-e8e38fcfa593552f70b6f7c229b459c136ae4e01.zip
Add files via upload
-rw-r--r--benchmark.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/benchmark.cpp b/benchmark.cpp
index 7564820c..7ee5a4be 100644
--- a/benchmark.cpp
+++ b/benchmark.cpp
@@ -82,10 +82,9 @@ const double maxLoadFactor = 0.77;
size_t erased = 0; \
clock_t difference, before = clock(); \
for (size_t i = 0; i < N; ++i) \
- M##_PUT(tag, i*123, i); \
- const size_t D=N*3/4; \
- for (size_t i = 0; i < N; ++i) \
- erased += M##_DEL(tag, i*123); \
+ M##_PUT(tag, i*17, i); \
+ for (size_t i = 0; i < N / 2; ++i) \
+ erased += M##_DEL(tag, i*17); \
difference = clock() - before; \
printf(#M "(" #tag "): sz: %llu, bucks: %llu, time: %.02f, erase %llu\n", M##_SIZE(tag), M##_BUCKETS(tag), (float) difference / CLOCKS_PER_SEC, erased); \
M##_CLEAR(tag); \
@@ -115,7 +114,7 @@ int main()
cvector_s_push(&names, cstring_make("Ruth"));
cvector_s_push(&names, cstring_make("Burt"));
- size_t res = cvector_s_find(names, cstring_tmp1k("Ruth"));
+ size_t res = cvector_s_find(names, cstring_temp("Ruth"));
printf("found %llu\n", res);
cvector_s_sort(&names);