good first issueoptimizationperformancesql
Metriche repository
- Star
- (3633 stelle)
- Metriche merge PR
- (Merge medio 13g 2h) (82 PR mergiate in 30 g)
Descrizione
Overall, problem is discussed here: https://github.com/tarantool/tarantool/issues/3330
Implementation of threaded interpretation is quite simple. However, it requires support of computed goto's by compiler. Most of mainstream compilers (gcc, clang, icc) provide that feature.
There are several examples of implementation: SQLite https://github.com/AlexKashuba/SQLite_JIT/blob/master/versions/sqlite_disp/jitsrc/vdbe.c#L646 PostgreSQL https://github.com/postgres/postgres/blob/master/src/backend/executor/execExprInterp.c#L117
Plan is following:
- Patch mkopcodec.sh and mkopcodeh.sh to produce array of goto addresses - it must be organised in the same order as corresponding OP_ values are defined.
- Define macros DISPATCH/CASE to hide internal implementation of dispatching: if compiler doesn't support precomputed labels, then we should use common switched technique.
- Replace break and case keywords with mentioned macros.
- Benchmark results using TPC-H set of queries.