Barretenberg
The ZK-SNARK library at the core of Aztec
|
#include "barretenberg/common/thread_pool.hpp"
#include "barretenberg/crypto/merkle_tree/fixtures.hpp"
#include "barretenberg/crypto/merkle_tree/hash.hpp"
#include "barretenberg/crypto/merkle_tree/indexed_tree/content_addressed_indexed_tree.hpp"
#include "barretenberg/crypto/merkle_tree/indexed_tree/indexed_leaf.hpp"
#include "barretenberg/crypto/merkle_tree/lmdb_store/lmdb_tree_store.hpp"
#include "barretenberg/crypto/merkle_tree/node_store/cached_content_addressed_tree_store.hpp"
#include "barretenberg/crypto/merkle_tree/response.hpp"
#include "barretenberg/numeric/random/engine.hpp"
#include <benchmark/benchmark.h>
#include <filesystem>
#include <memory>
#include <vector>
Go to the source code of this file.
Typedefs | |
using | StoreType = ContentAddressedCachedTreeStore< NullifierLeafValue > |
using | Poseidon2 = ContentAddressedIndexedTree< StoreType, Poseidon2HashPolicy > |
using | Pedersen = ContentAddressedIndexedTree< StoreType, PedersenHashPolicy > |
Enumerations | |
enum | InsertionStrategy { SEQUENTIAL , BATCH } |
Functions | |
template<typename TreeType > | |
void | add_values (TreeType &tree, const std::vector< NullifierLeafValue > &values) |
template<typename TreeType > | |
void | add_values_with_witness (TreeType &tree, const std::vector< NullifierLeafValue > &values) |
template<typename TreeType > | |
void | add_values_sequentially (TreeType &tree, const std::vector< NullifierLeafValue > &values) |
template<typename TreeType > | |
void | add_values_sequentially_with_witness (TreeType &tree, const std::vector< NullifierLeafValue > &values) |
template<typename TreeType , InsertionStrategy strategy> | |
void | multi_thread_indexed_tree_bench (State &state) noexcept |
template<typename TreeType , InsertionStrategy strategy> | |
void | single_thread_indexed_tree_bench (State &state) noexcept |
template<typename TreeType , InsertionStrategy strategy> | |
void | multi_thread_indexed_tree_with_witness_bench (State &state) noexcept |
template<typename TreeType , InsertionStrategy strategy> | |
void | single_thread_indexed_tree_with_witness_bench (State &state) noexcept |
Unit (benchmark::kMillisecond) -> RangeMultiplier(2) ->Range(2, MAX_BATCH_SIZE) ->Iterations(1000) | |
BENCHMARK_MAIN () | |
Variables | |
const size_t | TREE_DEPTH = 40 |
const size_t | MAX_BATCH_SIZE = 64 |
Definition at line 21 of file indexed_tree.bench.cpp.
Definition at line 20 of file indexed_tree.bench.cpp.
Definition at line 18 of file indexed_tree.bench.cpp.
enum InsertionStrategy |
Enumerator | |
---|---|
SEQUENTIAL | |
BATCH |
Definition at line 99 of file indexed_tree.bench.cpp.
void add_values | ( | TreeType & | tree, |
const std::vector< NullifierLeafValue > & | values | ||
) |
Definition at line 26 of file indexed_tree.bench.cpp.
void add_values_sequentially | ( | TreeType & | tree, |
const std::vector< NullifierLeafValue > & | values | ||
) |
Definition at line 62 of file indexed_tree.bench.cpp.
void add_values_sequentially_with_witness | ( | TreeType & | tree, |
const std::vector< NullifierLeafValue > & | values | ||
) |
Definition at line 81 of file indexed_tree.bench.cpp.
void add_values_with_witness | ( | TreeType & | tree, |
const std::vector< NullifierLeafValue > & | values | ||
) |
Definition at line 44 of file indexed_tree.bench.cpp.
BENCHMARK_MAIN | ( | ) |
|
noexcept |
Definition at line 101 of file indexed_tree.bench.cpp.
|
noexcept |
Definition at line 184 of file indexed_tree.bench.cpp.
|
noexcept |
Definition at line 142 of file indexed_tree.bench.cpp.
|
noexcept |
Definition at line 226 of file indexed_tree.bench.cpp.
Unit | ( | benchmark::kMillisecond | ) | -> RangeMultiplier(2) ->Range(2, MAX_BATCH_SIZE) ->Iterations(1000) |
const size_t MAX_BATCH_SIZE = 64 |
Definition at line 24 of file indexed_tree.bench.cpp.
const size_t TREE_DEPTH = 40 |
Definition at line 23 of file indexed_tree.bench.cpp.