发明名称 Optimization of declarative queries
摘要 Source code is generated that includes one or more iterator-based expressions such as declarative queries. The source code is translated into an intermediate language that classifies operators making up the iterator-based expressions into classes based on whether the operators are aggregating, element-wise, or sink operators. The intermediate language, including the identified classes, is processed using an automaton to replace the iterator-based expressions with one or more equivalent non-iterator-based expressions. Where an iterator-based expression is nested, the nested expression is processed using an equivalent number of nested automatons. The resulting optimized source code may be compiled and executed using fewer virtual function calls than the equivalent non-optimized source code.
申请公布号 US8914782(B2) 申请公布日期 2014.12.16
申请号 US201012943038 申请日期 2010.11.10
申请人 Microsoft Corporation 发明人 Isard Michael;Yu Yuan;Murray Derek Gordon
分类号 G06F9/45 主分类号 G06F9/45
代理机构 代理人 Goldsmith Micah;Smith Leonard;Minhas Micky
主权项 1. A method comprising: receiving, by a computing device, a source code file comprising one or more iterator-based expressions, wherein an iterator is an abstraction between an internal representation of a data structure and one or more functions that operate on the data structure, and an iterator-based expression is an expression that uses an iterator; for each of the one or more iterator-based expressions: replacing one or more operators in the iterator-based expression with one or more symbols corresponding to an operator class associated with each of the one or more operators by the computing device;generating a string comprising the iterator-based expression with the replaced one or more operators by the computing device; andprocessing the generated string to generate one or more non-iterator-based expressions that are functionally equivalent to the iterator-based expression by the computing device; associating, by the computing device, the generated one or more non-iterator-based expressions with the source code file; and compiling the source code file and the associated one or more non-iterator-based expressions to generate a computer executable program.
地址 Redmond WA US