Compare commits
3 Commits
v0.0.13
...
5e06a30357
| Author | SHA1 | Date | |
|---|---|---|---|
| 5e06a30357 | |||
| cb6e4292f2 | |||
| 154a48ded0 |
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
project(
|
||||
conflict-set
|
||||
VERSION 0.0.13
|
||||
VERSION 0.0.14
|
||||
DESCRIPTION
|
||||
"A data structure for optimistic concurrency control on ranges of bitwise-lexicographically-ordered keys."
|
||||
HOMEPAGE_URL "https://git.weaselab.dev/weaselab/conflict-set"
|
||||
|
||||
@@ -4073,6 +4073,62 @@ struct __attribute__((visibility("default"))) PeakPrinter {
|
||||
|
||||
#ifdef ENABLE_MAIN
|
||||
|
||||
#define ANKERL_NANOBENCH_IMPLEMENT
|
||||
#include "third_party/nanobench.h"
|
||||
|
||||
template <int kN> void benchRezero() {
|
||||
static_assert(kN % 16 == 0);
|
||||
ankerl::nanobench::Bench bench;
|
||||
InternalVersionT vs[kN];
|
||||
InternalVersionT zero;
|
||||
bench.run("rezero" + std::to_string(kN), [&]() {
|
||||
bench.doNotOptimizeAway(vs);
|
||||
bench.doNotOptimizeAway(zero);
|
||||
for (int i = 0; i < kN; i += 16) {
|
||||
rezero16(vs + i, zero);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
template <int kN> void benchScan1() {
|
||||
static_assert(kN % 16 == 0);
|
||||
ankerl::nanobench::Bench bench;
|
||||
InternalVersionT vs[kN];
|
||||
uint8_t is[kN];
|
||||
uint8_t begin;
|
||||
uint8_t end;
|
||||
InternalVersionT v;
|
||||
bench.run("scan" + std::to_string(kN), [&]() {
|
||||
bench.doNotOptimizeAway(vs);
|
||||
bench.doNotOptimizeAway(is);
|
||||
bench.doNotOptimizeAway(begin);
|
||||
bench.doNotOptimizeAway(end);
|
||||
bench.doNotOptimizeAway(v);
|
||||
for (int i = 0; i < kN; i += 16) {
|
||||
scan16</*kAVX512=*/true>(vs + i, is + i, begin, end, v);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
template <int kN> void benchScan2() {
|
||||
static_assert(kN % 16 == 0);
|
||||
ankerl::nanobench::Bench bench;
|
||||
InternalVersionT vs[kN];
|
||||
uint8_t is[kN];
|
||||
uint8_t begin;
|
||||
uint8_t end;
|
||||
InternalVersionT v;
|
||||
bench.run("scan" + std::to_string(kN), [&]() {
|
||||
bench.doNotOptimizeAway(vs);
|
||||
bench.doNotOptimizeAway(begin);
|
||||
bench.doNotOptimizeAway(end);
|
||||
bench.doNotOptimizeAway(v);
|
||||
for (int i = 0; i < kN; i += 16) {
|
||||
scan16</*kAVX512=*/true>(vs + i, begin, end, v);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void printTree() {
|
||||
int64_t writeVersion = 0;
|
||||
ConflictSet::Impl cs{writeVersion};
|
||||
@@ -4094,7 +4150,7 @@ void printTree() {
|
||||
debugPrintDot(stdout, cs.root, &cs);
|
||||
}
|
||||
|
||||
int main(void) { printTree(); }
|
||||
int main(void) { benchScan1<16>(); }
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_FUZZ
|
||||
|
||||
BIN
corpus/403cac13d939872be09b35ba73712a7026412ad2
Normal file
BIN
corpus/403cac13d939872be09b35ba73712a7026412ad2
Normal file
Binary file not shown.
BIN
corpus/5ede0d70336f00fad64d4a617e5b34f53533a306
Normal file
BIN
corpus/5ede0d70336f00fad64d4a617e5b34f53533a306
Normal file
Binary file not shown.
BIN
corpus/6edf9950965a9643a3f5611164e77fdcc3f31b99
Normal file
BIN
corpus/6edf9950965a9643a3f5611164e77fdcc3f31b99
Normal file
Binary file not shown.
BIN
corpus/83fb951c0b10b3a0beffbb100314c717a8085c05
Normal file
BIN
corpus/83fb951c0b10b3a0beffbb100314c717a8085c05
Normal file
Binary file not shown.
BIN
corpus/8ad5c9dd3bc2f5323dc895bd924c45351413ee4d
Normal file
BIN
corpus/8ad5c9dd3bc2f5323dc895bd924c45351413ee4d
Normal file
Binary file not shown.
BIN
corpus/927404b87e7cf01180250b4c9310efa8911462e4
Normal file
BIN
corpus/927404b87e7cf01180250b4c9310efa8911462e4
Normal file
Binary file not shown.
BIN
corpus/9c3032fc7003dbee823e55556bc24c5f5833311e
Normal file
BIN
corpus/9c3032fc7003dbee823e55556bc24c5f5833311e
Normal file
Binary file not shown.
BIN
corpus/a7298a2735842a9f9a9f7c40c1f940df308c4107
Normal file
BIN
corpus/a7298a2735842a9f9a9f7c40c1f940df308c4107
Normal file
Binary file not shown.
BIN
corpus/e8a5b4c5982787a48fd8f410012bed2e25ded753
Normal file
BIN
corpus/e8a5b4c5982787a48fd8f410012bed2e25ded753
Normal file
Binary file not shown.
Reference in New Issue
Block a user