Observation and analysis based code optimization
Abstract
Observation and analysis based optimization of software code is disclosed. An expected value is chosen for a dynamic attribute that cannot be determined, prior to execution of the associated software code, to be guaranteed to have that expected value at runtime. An optimized version of the software code is generated, including one or more optimizations based on an assumption that the dynamic attribute will have the expected value. Non-exhaustive examples of a dynamic attribute include a variable type; a location in memory; a location in which a global object, property, or variable is stored; the contents of a global function or method; and a value of a global property or variable. A check is performed during execution of the optimized version of the software code, prior to executing the portion that has been optimized based on the assumption, to verify that the dynamic attribute has the expected value. In the event that it is determined at runtime that the dynamic attribute does not have the expected value, execution reverts to backup code that is not based on the assumption that dynamic attribute will have the expected value.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 38 · Forward citations: 8.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer-implemented method for optimizing a manner in which a software code is executed, comprising: during a compilation of the software code: determining, for a dynamic attribute associated with the software code, an expected value that the dynamic attribute will take on at a runtime of the software code, wherein the software code is dynamically typed, and determining the expected value comprises applying a static type inference analysis to the dynamically typed software code; generating an un-optimized version of the software code, wherein the un-optimized version is based on an assumpti
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (8 of 8 total)
References Cited — Backward Prior Art (38)
Non-Patent Literature (5)
- Arnold et al. Adaptive optimization in the Jalapeno JVM. OOPSLA. ACM (2000).
- Asher et al., "The effect of unrolling and inlining for Python bytecode optimizations." SYSTOR'09 (May 4-6, 2009), Haifa, Israel.
- Chambers et al., "An efficient implementation of SELF, a dynamically-typed object-oriented language based on prototypes." LISP & Symbolic Computation, pp. 243-281 (1991).
- Chambers et al., "Making pure object-oriented languages practical." OOPSLA Conf. Proc. (Oct. 1991).
- Deconinick, G. et al., (1993), "Survey of Backward Error Recovery Techniques for Multicomputers Based on Checkpointing and Rollback", Proc. of IASTED Int. Conf. on Modelling and Simulation, Pittsburgh, PA, May 10-12, 1993, pp. 262-265.