summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-04-01 15:08:04 +0200
committerGitHub <[email protected]>2020-04-01 15:08:04 +0200
commitc96ecb070a55352fd258ae757b1150031dabf77e (patch)
treefb518ad19079b48326aa7f77fb5d39bfc4806dfa
parent63ccf43460b4553176e431449638accfcc29324f (diff)
downloadSTC-modified-c96ecb070a55352fd258ae757b1150031dabf77e.tar.gz
STC-modified-c96ecb070a55352fd258ae757b1150031dabf77e.zip
Add files via upload
-rw-r--r--benchmark.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/benchmark.cpp b/benchmark.cpp
index aa0619a0..79d8edb7 100644
--- a/benchmark.cpp
+++ b/benchmark.cpp
@@ -2,13 +2,15 @@
#include <stdio.h>
#include <time.h>
-#include <unordered_map>
#include "ccl/cstring.h"
#include "ccl/cmap.h"
+#ifdef __cplusplus
+#include <unordered_map>
#include "others/bytell_hash_map.hpp"
#include "others/robin_hood.hpp"
+#endif
-declare_CMap(ii, int64_t, int64_t);
+declare_CMap(ii, int64_t, int64_t, c_defaultDestroy, c_lowbias32Hash);
declare_CVector_string(s);
declare_CMap(ix, short, short);
@@ -93,17 +95,20 @@ const double maxLoadFactor = 0.77;
int main()
{
- MAP_TEST1(UMAP, ii)
MAP_TEST1(CMAP, ii)
+#ifdef __cplusplus
+ MAP_TEST1(UMAP, ii)
MAP_TEST1(BMAP, ii)
MAP_TEST1(FMAP, ii)
MAP_TEST1(RMAP, ii)
-
- MAP_TEST2(UMAP, ii)
+#endif
MAP_TEST2(CMAP, ii)
+#ifdef __cplusplus
+ MAP_TEST2(UMAP, ii)
MAP_TEST2(BMAP, ii)
MAP_TEST2(FMAP, ii)
MAP_TEST2(RMAP, ii)
+#endif
printf("ix entry size %llu\n", sizeof(CMapEntry_ix));