-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
-
QE 2023-05-15, QE 2023-05-29, QE 2023-06-12, QE 2023-06-26, QE 2023-07-10
-
10
Current compilation of EExpression that relies on following pattern:
vm::CodeFragment compileDirect(CompileCtx& ctx) {
vm::CodeFragment code;
code.append ...
return code;
}
this results in O(N*D) complexity, where N is size of expression and D is depth of tree.
Instead, use linear compilation that uses the following pattern:
struct CompileCtx { vm::CodeFragment* code; }; void compileDirect(CompileCtx& ctx) { ctx.code->append ... }
in most cases to achieve O(N).
In complex cases, the compileDirect may still allowed to use separate vm::CodeFragments if needed.
- depends on
-
SERVER-71346 Add support for labels in vm::CodeFragment
- Closed
- related to
-
SERVER-78587 Improve VM logicAnd/Or compileDirect to avoid quadratic behavior
- Closed