Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-95755

Verify perf regression if Expression::evaluate is moved to a walker

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • QE 2024-10-28, QE 2024-11-11, QE 2024-11-25

      There is a 

      ExpressionWalker walker(..)
      expression_walker::walk<const Expression>(expr, &walker); 

      pattern used in gen_expression.cpp to iterate over a tree of Expression objects using a visitor pattern.

      Purpose of this PoC is to quickly assess whether the walker is suitable for evaluating the expression (i.e. move the ExpressionXYZ::evalute() body into the visit(ExpressionXYZ* node) method), especially to check:

      1) every expression ends up evaluating all its children before computing its value

      2) performances (compared with a Google Benchmark unit test) of a large operation (e.g. and Add operation with 5000 numerical values) are comparable with the current evaluate() approach

            Assignee:
            foteini.alvanaki@mongodb.com Foteini Alvanaki
            Reporter:
            alberto.massari@mongodb.com Alberto Massari
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: