AOT and JIT Compilation Hybrid for Deployment Latency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing compilation methods face challenges in balancing the dynamic optimization of just-in-time compilation with the startup delays and inefficiencies of ahead-of-time compilation, particularly in deploying applications efficiently and minimizing system latency.

Innovation Solution

Combining ahead-of-time and just-in-time compilation by initially deploying applications using JIT compilation while performing AOT compilation in the background, allowing for faster initial access and subsequent deployment with AOT-compiled machine code, thereby reducing system latency and improving overall performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If ahead-of-time compilation is used, then application deployment speed is improved, but system latency increases due to compilation time

Engineering Contradiction:
Improveapplication deployment speedVSAvoidcompilation time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The system performs ahead-of-time compilation in advance to generate machine code, storing it for later use. This preliminary action allows the application to be deployed quickly without undergoing compilation at runtime, thus improving deployment speed while avoiding runtime latency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The compilation process is segmented into two distinct phases: ahead-of-time compilation that generates machine code separately, and runtime execution that directly uses the pre-compiled code. This segmentation allows the heavy compilation work to be done in advance without blocking the deployment process.

Inventive Principle:
Principle #1Segmentation

2Loss of time

If just-in-time compilation is used, then system latency is reduced, but deployment complexity increases due to runtime compilation environment requirements

Engineering Contradiction:
Improvesystem latencyVSAvoidcompilation environment complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The system extracts the compilation step from the runtime execution environment. By using ahead-of-time compilation to generate machine code beforehand, the complex compilation environment and runtime compilation processes are removed from the deployment system, reducing overall system complexity while maintaining fast execution.

Inventive Principle:
Principle #2Taking out (Extraction)

3Speed

If ahead-of-time compilation is used, then runtime execution speed is improved, but initial compilation resource usage increases

Engineering Contradiction:
Improveruntime execution speedVSAvoidcompilation resource usage
Core Design Contradiction:
SpeedVSUse of energy by moving object

Solution Approach 1:

The system performs compilation as a preliminary action before runtime execution. By generating machine code in advance through ahead-of-time compilation, the resource-intensive compilation process is shifted to a separate setup phase, allowing runtime execution to use the pre-generated code with minimal resource consumption.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11416271B2Combining ahead-of-time compilation and just-in-time compilation to improve application deployment
Publication Date: 2022.08.16 RED HAT INC
  • US11416271B2 patent drawing
  • US11416271B2 patent drawing
  • US11416271B2 patent drawing

AI summary

Ahead-of-time (AOT) and just-in-time (JIT) compilation can be combined to improve application deployment. For example, an application can be deployed in a first container for responding to requests associated with the application. The first container is configured to execute the application at least in part by performing JIT compilation. While the application is deployed within the first container, program code for the application can be compiled in a second container by performing AOT. Based on determining that AOT compilation is complete, a system can be configured to respond to subsequent requests associated with the application by executing the machine code.