diff options
| author | Tyge Løvset <[email protected]> | 2021-10-05 09:00:28 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-10-05 09:05:25 +0200 |
| commit | bf00ed0e7023cf49cf004dd4b4b39af2b824681e (patch) | |
| tree | adadcc1ac34fd5b614e566028d37d29db8fb7f80 /benchmarks | |
| parent | 88c67afa63e46551c67f573e0557323518c42f81 (diff) | |
| download | STC-modified-bf00ed0e7023cf49cf004dd4b4b39af2b824681e.tar.gz STC-modified-bf00ed0e7023cf49cf004dd4b4b39af2b824681e.zip | |
Changed recommended order of defining template parameters.
Diffstat (limited to 'benchmarks')
| -rw-r--r-- | benchmarks/clist_benchmark.cpp | 2 | ||||
| -rw-r--r-- | benchmarks/cmap_benchmark.cpp | 2 | ||||
| -rw-r--r-- | benchmarks/cpque_benchmark.cpp | 2 | ||||
| -rw-r--r-- | benchmarks/csmap_benchmark.cpp | 2 | ||||
| -rw-r--r-- | benchmarks/cvec_benchmark.cpp | 2 | ||||
| -rw-r--r-- | benchmarks/shootout1_cmap.cpp | 4 | ||||
| -rw-r--r-- | benchmarks/shootout2_cmap.cpp | 2 | ||||
| -rw-r--r-- | benchmarks/shootout3_csmap.cpp | 4 |
8 files changed, 10 insertions, 10 deletions
diff --git a/benchmarks/clist_benchmark.cpp b/benchmarks/clist_benchmark.cpp index 8151afa9..525bcc5a 100644 --- a/benchmarks/clist_benchmark.cpp +++ b/benchmarks/clist_benchmark.cpp @@ -16,8 +16,8 @@ uint64_t seed = 1, mask1 = 0xfffffff, mask2 = 0xffff; static float secs(Range s) { return (float)(s.t2 - s.t1) / CLOCKS_PER_SEC; }
-#define i_tag x
#define i_val size_t
+#define i_tag x
#include <stc/clist.h>
#ifdef __cplusplus
diff --git a/benchmarks/cmap_benchmark.cpp b/benchmarks/cmap_benchmark.cpp index 6e0ef325..d94f2f24 100644 --- a/benchmarks/cmap_benchmark.cpp +++ b/benchmarks/cmap_benchmark.cpp @@ -15,10 +15,10 @@ uint64_t seed = 1, mask1 = 0xffffffff; static float secs(Range s) { return (float)(s.t2 - s.t1) / CLOCKS_PER_SEC; }
-#define i_tag x
#define i_key size_t
#define i_val size_t
#define i_hash c_default_hash64
+#define i_tag x
#include <stc/cmap.h>
#ifdef __cplusplus
diff --git a/benchmarks/cpque_benchmark.cpp b/benchmarks/cpque_benchmark.cpp index 5f7dd364..19a9c701 100644 --- a/benchmarks/cpque_benchmark.cpp +++ b/benchmarks/cpque_benchmark.cpp @@ -2,9 +2,9 @@ #include <time.h>
#include <stc/crandom.h>
-#define i_tag f
#define i_val float
#define i_cmp -c_default_compare
+#define i_tag f
#include <stc/cpque.h>
int main()
diff --git a/benchmarks/csmap_benchmark.cpp b/benchmarks/csmap_benchmark.cpp index 18af9a34..fa1e10cf 100644 --- a/benchmarks/csmap_benchmark.cpp +++ b/benchmarks/csmap_benchmark.cpp @@ -15,9 +15,9 @@ uint64_t seed = 1, mask1 = 0xfffffff; static float secs(Range s) { return (float)(s.t2 - s.t1) / CLOCKS_PER_SEC; }
-#define i_tag x
#define i_key size_t
#define i_val size_t
+#define i_tag x
#include <stc/csmap.h>
#ifdef __cplusplus
diff --git a/benchmarks/cvec_benchmark.cpp b/benchmarks/cvec_benchmark.cpp index 5cc2fb34..f7755cf6 100644 --- a/benchmarks/cvec_benchmark.cpp +++ b/benchmarks/cvec_benchmark.cpp @@ -16,8 +16,8 @@ uint64_t seed = 1, mask1 = 0xfffffff, mask2 = 0xffff; static float secs(Range s) { return (float)(s.t2 - s.t1) / CLOCKS_PER_SEC; }
-#define i_tag x
#define i_val size_t
+#define i_tag x
#include <stc/cvec.h>
#ifdef __cplusplus
diff --git a/benchmarks/shootout1_cmap.cpp b/benchmarks/shootout1_cmap.cpp index 2cdb919f..fab25096 100644 --- a/benchmarks/shootout1_cmap.cpp +++ b/benchmarks/shootout1_cmap.cpp @@ -35,16 +35,16 @@ DEFMAP(map_i, <int, int>); DEFMAP(map_x, <uint64_t, uint64_t>);
DEFMAP(map_s, <std::string, std::string>);
-#define i_tag i
#define i_key int
#define i_val int
#define i_hash c_default_hash32
+#define i_tag i
#include <stc/cmap.h>
-#define i_tag x
#define i_key size_t
#define i_val size_t
#define i_hash c_default_hash64
+#define i_tag x
#include <stc/cmap.h>
#define i_key_str
diff --git a/benchmarks/shootout2_cmap.cpp b/benchmarks/shootout2_cmap.cpp index 77d458bc..fb24465a 100644 --- a/benchmarks/shootout2_cmap.cpp +++ b/benchmarks/shootout2_cmap.cpp @@ -16,10 +16,10 @@ template<typename C> inline void destroy_me(C& c) { C().swap(c); } // Visual Studio: compile with -TP to force C++: cl -TP -EHsc -O2 benchmark.c
// cmap and khash template expansion
-#define i_tag ii
#define i_key int64_t
#define i_val int64_t
#define i_cmp c_default_hash64
+#define i_tag ii
#include <stc/cmap.h>
KHASH_MAP_INIT_INT64(ii, int64_t)
diff --git a/benchmarks/shootout3_csmap.cpp b/benchmarks/shootout3_csmap.cpp index 35abf8a8..3682c874 100644 --- a/benchmarks/shootout3_csmap.cpp +++ b/benchmarks/shootout3_csmap.cpp @@ -15,14 +15,14 @@ using omap_i = std::map<int, int>; using omap_x = std::map<uint64_t, uint64_t>;
using omap_s = std::map<std::string, std::string>;
-#define i_tag i
#define i_key int
#define i_val int
+#define i_tag i
#include <stc/csmap.h>
-#define i_tag x
#define i_key size_t
#define i_val size_t
+#define i_tag x
#include <stc/csmap.h>
#define i_key_str
|
