Runtime Code Binding for Execution Performance Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing compilation methods generate executable code that is general enough to handle all possible inputs, leading to sub-optimal performance due to redundant instructions and excessive resource consumption, while interpretation and just-in-time compilation have limitations in optimizing code for specific inputs.

Innovation Solution

A mechanism where a compiler and runtime interoperate to bind executable code at runtime, using runtime information to select optimized lower-level instructions based on input data configurations, generating multiple versions of code to handle different input scenarios efficiently.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If compiled executable code is generated to handle all possible inputs, then generality and reliability are improved, but execution performance deteriorates due to redundant instructions and excessive resource consumption

Engineering Contradiction:
Improvecode generalityVSAvoidexecution performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system dynamically selects and binds different versions of lower level instructions at runtime based on the actual configuration of input data. This allows the code to adapt its execution path to match the specific input characteristics, eliminating redundant instructions and optimizing resource usage while maintaining the ability to handle various input types.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The compiler generates multiple versions of lower level instructions with different optimization parameters tailored to specific input configurations. At runtime, the system changes the bound instruction version based on detected input parameters, thereby optimizing execution performance for the specific input case while preserving generality across different input types.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If just-in-time compilation is used to optimize code for specific inputs, then execution performance is improved, but runtime overhead increases due to compilation time

Engineering Contradiction:
Improveexecution performanceVSAvoidruntime overhead
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The compiler performs preliminary generation of multiple optimized instruction versions during compile time, preparing all possible optimized code paths in advance. At runtime, the system only needs to select and bind the appropriate pre-compiled version based on input configuration, avoiding the time-consuming process of compiling entire code sections at runtime while still achieving optimization benefits.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system extracts and separates the optimization decision-making process from the main compilation process. Only the specific aspect of code binding is performed at runtime based on input data configuration, while the heavy lifting of code generation is completed during compile time. This extraction minimizes runtime overhead while preserving performance optimization benefits.

Inventive Principle:
Principle #2Taking out (Extraction)

3Adaptability or versatility

If multiple versions of lower level instructions are compiled for different input configurations, then adaptability is improved, but code complexity increases

Engineering Contradiction:
Improveinput configuration adaptabilityVSAvoidcode structure complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The system introduces an intermediary binding mechanism that sits between the high-level source code and multiple versions of lower level instructions. This intermediary layer manages the complexity of having multiple instruction versions by providing a unified interface for binding the appropriate version at runtime based on input configuration, thereby maintaining adaptability while abstracting away the structural complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentEP2718808B1Binding executable code at runtime
Publication Date: 2020.06.10 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP2718808B1 patent drawingFigure 1A
  • EP2718808B1 patent drawingFigure 1B
  • EP2718808B1 patent drawingFigure 1C

AI summary

The present invention extends to methods, systems, and computer program products for binding executable code at runtime. Embodiments of the invention include late binding of specified aspects of code to improve execution performance. A runtime dynamically binds lower level code based on runtime information to optimize execution of a higher level algorithm. Aspects of a higher level algorithm having a requisite (e.g., higher) impact on execution performance can be targeted for late binding. Improved performance can be achieved with minimal runtime costs using late binding for aspects having the requisite execution performance impact.