Project
Loading...
Searching...
No Matches
benchmark_GandivaExpressions.cxx File Reference
#include "Framework/Expressions.h"
#include "Framework/ExpressionHelpers.h"
#include "Framework/HistogramRegistry.h"
#include "Framework/Logger.h"
#include <benchmark/benchmark.h>
#include <random>

Go to the source code of this file.

Namespaces

namespace  test
 FIXME: do not use data model tables.
 

Typedefs

using TT = o2::soa::Table< test::X, test::Y, test::Z, test::D< test::X, test::Y, test::Z > >
 
using RT = o2::soa::Table< test::X, test::Y, test::Z, test::cD, test::D< test::X, test::Y, test::Z > >
 

Functions

 test::DECLARE_SOA_COLUMN (X, x, float, "x")
 
 test::DECLARE_SOA_COLUMN (Y, y, float, "y")
 
 test::DECLARE_SOA_COLUMN (Z, z, float, "z")
 
 test::DECLARE_SOA_COLUMN (cD, cd, float, "cd")
 
 test::DECLARE_SOA_DYNAMIC_COLUMN (D, d, [](float x, float y, float z) { return std::sqrt(x *x+y *y+z *z);})
 
 BENCHMARK (BM_DirectCalculation) -> Arg(maxrows)
 
 BENCHMARK (BM_GandivaExpression) -> Arg(maxrows)
 
 BENCHMARK_MAIN ()
 

Variables

auto createTable
 

Typedef Documentation

◆ RT

using RT = o2::soa::Table<test::X, test::Y, test::Z, test::cD, test::D<test::X, test::Y, test::Z> >

Definition at line 35 of file benchmark_GandivaExpressions.cxx.

◆ TT

using TT = o2::soa::Table<test::X, test::Y, test::Z, test::D<test::X, test::Y, test::Z> >

Definition at line 34 of file benchmark_GandivaExpressions.cxx.

Function Documentation

◆ BENCHMARK() [1/2]

BENCHMARK ( BM_DirectCalculation  ) -> Arg(maxrows)

◆ BENCHMARK() [2/2]

BENCHMARK ( BM_GandivaExpression  ) -> Arg(maxrows)

◆ BENCHMARK_MAIN()

BENCHMARK_MAIN ( )

Variable Documentation

◆ createTable

auto createTable
Initial value:
= [](size_t nrows) {
static TableBuilder builder;
auto static rowWriter = builder.persist<float, float, float>({"x", "y", "z"});
for (auto i = 0u; i < nrows; ++i) {
rowWriter(0, G(e), G(e), G(e));
}
auto table = builder.finalize();
return TT{table};
}
int32_t i
auto persist(std::array< char const *, sizeof...(ARGS)+1 > const &columnNames)
std::shared_ptr< arrow::Table > finalize()

Definition at line 42 of file benchmark_GandivaExpressions.cxx.