Learn through the super-clean Baeldung Pro experience:
>> Membership and Baeldung Pro.
No ads, dark-mode and 6 months free of IntelliJ Idea Ultimate to start with.
Last updated: March 18, 2024
Compile, load, and execution times are all computer science terms referring to the various stages of running software programs.
In this tutorial, we’ll review them and look at their differences and similarities.
Compile-time refers to the phase in which computer programs/code is translated into a format that can be understood by the CPU, i.e. machine-readable code. This is usually done by a compiler. At compile-time, code in the source language is translated to a specific target language.
Some common operations performed during compile time include syntax and semantic analysis. Additionally, compile time is also characterized by the association of program instructions to specific physical memory locations in the computer.
Load time usually comes next and refers to the stage at which programs are loaded into memory with the use of a loader.
At load time, the program is also prepared for the next stage i.e. execution. Some operations performed during this time includes reading the instructions in the program, ensuring that any resources needed for execution are prepared.
Execution time refers to the stage at which the instructions in the computer programs/code are executed. At execution time, run-time libraries are used. Some basic operations that occur at execution time include reading program instructions to carry out tasks or complete actions.
The main similarity is that all three operations are performed by the CPU.
Some notable differences are:
| Compile Time | Load Time | Execution Time |
|---|---|---|
| Code is translated into machine-readable format | Program code is loaded into memory | Program code is executed |
| Completed with a compiler | Completed with a loader | Completed with run-time libraries |
In this article, we’ve reviewed some similarities and differences between compile, load, and execution times.