Details
-
Task
-
Status: Open
-
Major - P3
-
Resolution: Unresolved
-
None
-
None
-
None
-
QE 2023-02-06, QE 2023-02-20
-
10
Description
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.
Attachments
Issue Links
- depends on
-
SERVER-71346 Add support for labels in vm::CodeFragment
-
- Open
-