diff options
| author | Tyge Løvset <[email protected]> | 2022-03-04 13:18:35 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-03-04 13:18:35 +0100 |
| commit | 3c379fbfb2b7301cd5c4f5371a9f0b96a1369b60 (patch) | |
| tree | 46975c8374107e44fd9605894ce5b02d981ba538 /benchmarks/misc/rust_cmap.c | |
| parent | c4301c6b492bb962a943335bf8df4920b2a699cf (diff) | |
| download | STC-modified-3c379fbfb2b7301cd5c4f5371a9f0b96a1369b60.tar.gz STC-modified-3c379fbfb2b7301cd5c4f5371a9f0b96a1369b60.zip | |
Updated printf formatting to portable code. This was also to use http://winlibs.com gcc+clang with ucrt runtime-libs without warnings.
Diffstat (limited to 'benchmarks/misc/rust_cmap.c')
| -rw-r--r-- | benchmarks/misc/rust_cmap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/benchmarks/misc/rust_cmap.c b/benchmarks/misc/rust_cmap.c index aa96c2c5..7df8fa59 100644 --- a/benchmarks/misc/rust_cmap.c +++ b/benchmarks/misc/rust_cmap.c @@ -30,7 +30,7 @@ int main() ms = CLOCKS_PER_SEC/1000;
cmap_u64_max_load_factor(&m, 0.8);
cmap_u64_reserve(&m, n);
- printf("STC cmap n = %zu, mask = 0x%zx\n", n, mask);
+ printf("STC cmap n = %" PRIuMAX ", mask = 0x%" PRIxMAX "\n", n, mask);
uint64_t rng[3] = {1872361123, 123879177, 87739234}, sum;
clock_t now = clock();
@@ -38,17 +38,17 @@ int main() uint64_t key = romu_trio(rng) & mask;
cmap_u64_insert(&m, key, 0).ref->second += 1;
}
- printf("insert : %zums \tsize : %zu\n", (clock() - now)/ms, cmap_u64_size(m));
+ printf("insert : %zums \tsize : %" PRIuMAX "\n", (clock() - now)/ms, cmap_u64_size(m));
now = clock();
sum = 0;
c_forrange (key, mask + 1) { sum += cmap_u64_contains(&m, key); }
- printf("lookup : %zums \tsum : %zu\n", (clock() - now)/ms, sum);
+ printf("lookup : %zums \tsum : %" PRIuMAX "\n", (clock() - now)/ms, sum);
now = clock();
sum = 0;
c_foreach (i, cmap_u64, m) { sum += i.ref->second; }
- printf("iterate : %zums \tsum : %zu\n", (clock() - now)/ms, sum);
+ printf("iterate : %zums \tsum : %" PRIuMAX "\n", (clock() - now)/ms, sum);
uint64_t rng2[3] = {1872361123, 123879177, 87739234};
now = clock();
@@ -56,7 +56,7 @@ int main() uint64_t key = romu_trio(rng2) & mask;
cmap_u64_erase(&m, key);
}
- printf("remove : %zums \tsize : %zu\n", (clock() - now)/ms, cmap_u64_size(m));
+ printf("remove : %zums \tsize : %" PRIuMAX "\n", (clock() - now)/ms, cmap_u64_size(m));
printf("press a key:\n"); getchar();
}
}
\ No newline at end of file |
