mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-25 04:36:11 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user