Vector Downward GetSize optimization (#6925)

* Added Google benchmarks (and gtests)

* Separate benchmark CMakeLists.txt to its own file

* Move output directory to target just flatbenchmark

* Reduced from encoding 210ns -> 188ns

* store size_ as uoffset_t

* fixed windows c4267 warning
This commit is contained in:
Derek Bailey
2021-11-22 19:50:42 -08:00
committed by GitHub
parent a2b99084b4
commit 9e4ca857b6
4 changed files with 26 additions and 14 deletions

View File

@@ -37,6 +37,7 @@ set(FlatBenchmark_SRCS
${CPP_BENCH_DIR}/benchmark_main.cpp
${CPP_FB_BENCH_DIR}/fb_bench.cpp
${CPP_RAW_BENCH_DIR}/raw_bench.cpp
${CPP_BENCH_FB_GEN}
)
# Generate the flatbuffers benchmark code from the flatbuffers schema using

View File

@@ -93,4 +93,4 @@ static void BM_Raw_Use(benchmark::State &state) {
std::unique_ptr<Bench> bench = NewRawBench();
Use(state, bench, buffer, 218812692406581874);
}
BENCHMARK(BM_Raw_Use);
BENCHMARK(BM_Raw_Use);