JIT Compilation Startup Time Reduction via Emulation Model

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Computer processors face significant delays in executing programming operations due to the need for complete compilation of code into native architecture at runtime, which slows down the initial execution of code sequences.

Innovation Solution

Implementing a system with both an emulation model and a compilation model that allows initial execution using the emulation model while parallel compilation occurs, transferring execution to compiled operations once a compilation threshold is met, thereby reducing startup time.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If code is compiled into native architecture at runtime, then execution speed is improved, but startup time increases due to compilation delay

Engineering Contradiction:
Improveexecution speedVSAvoidstartup time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The system performs preliminary compilation of code sequences into native architecture before execution is needed. The compilation model compiles bytecode into native instructions in advance, storing the compiled code for immediate execution, thereby eliminating startup delays while maintaining high execution speed.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system divides code sequences into segments that are pre-compiled independently. Each segment can be compiled and stored separately, allowing the execution model to load and run pre-compiled segments immediately without waiting for compilation during startup.

Inventive Principle:
Principle #1Segmentation

2Loss of time

If code is executed immediately without compilation, then startup time is reduced, but execution speed decreases due to interpretation overhead

Engineering Contradiction:
Improvestartup timeVSAvoidexecution speed
Core Design Contradiction:
Loss of timeVSSpeed

Solution Approach 1:

The compilation model performs preliminary compilation of bytecode into native instructions before execution. This pre-compiled native code is then executed by the execution model at high speed without interpretation overhead, while the pre-compilation ensures immediate availability at startup.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system introduces a compilation model as an intermediary that translates bytecode into native instructions in advance. This intermediary layer prepares optimized native code that the execution model can run directly, eliminating the need for real-time interpretation during execution.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If complete compilation is performed before execution, then execution efficiency is maximized, but system responsiveness to code changes decreases

Engineering Contradiction:
Improveexecution efficiencyVSAvoidresponsiveness to code changes
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The system segments code into independently compilable units. When code changes occur, only the affected segments need to be recompiled rather than the entire codebase, maintaining execution efficiency for unchanged segments while improving responsiveness to changes.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The compilation system is made dynamic by allowing selective recompilation of code segments based on change detection. The system can adaptively recompile only modified portions while keeping unchanged compiled code active, balancing execution efficiency with adaptability to code changes.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11029929B2Using emulation to improve startup time for just-in-time compilation
Publication Date: 2021.06.08 RED HAT INC
  • US11029929B2 patent drawing
  • US11029929B2 patent drawing
  • US11029929B2 patent drawing

AI summary

A system and method are provided for emulating a code sequence while compiling the code sequence into compiled operations for later execution of the code sequence. In one embodiment, the system includes an emulation model for executing operations and a compilation model for compiling operations. The emulation model may execute operations of the code sequence and the compilation model may compile the operations of the code sequence into compiled operations. The system may transfer execution of the operations from the emulation model to the compiled operations. In certain implementations, the transfer may include transferring flow information and program execution information. In further implementations, the transfer may occur after detecting that a current compilation level of the code sequence exceeds a compilation threshold.