MCPcopy Create free account
hub / github.com/cwida/ALP / bench_decode_zstd

Function bench_decode_zstd

publication/source_code/bench_speed/bench_zstd.cpp:8–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6// NOLINTBEGIN
7
8static __attribute__((noinline)) benchmark::BenchmarkReporter::Run
9bench_decode_zstd(alp_bench::ALPColumnDescriptor& dataset, void* enc_arr, size_t enc_size, void* dec_arr) {
10
11 int benchmark_number = dataset.id;
12
13#ifdef NDEBUG
14 uint64_t iterations = 300000 / 128;
15#else
16 uint64_t iterations = 1;
17#endif
18
19 std::string benchmark_name = dataset.name + "_decode";
20 size_t DECODED_SIZE = 8 * 131072;
21
22 uint64_t cycles = benchmark::cycleclock::Now();
23 for (uint64_t j = 0; j < iterations; ++j) {
24 ZSTD_decompress(dec_arr, DECODED_SIZE, enc_arr, enc_size);
25 }
26
27 cycles = benchmark::cycleclock::Now() - cycles;
28
29 return benchmark::BenchmarkReporter::Run(
30 benchmark_number, benchmark_name, iterations, double(cycles) / (double(iterations) * 131072));
31}
32
33static __attribute__((noinline)) benchmark::BenchmarkReporter::Run
34bench_encode_zstd(alp_bench::ALPColumnDescriptor& dataset, double* dbl_arr, void* enc_arr) {

Callers 1

benchmark_allFunction · 0.85

Calls 2

NowFunction · 0.50
RunClass · 0.50

Tested by

no test coverage detected