This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Compile time" – news ·newspapers ·books ·scholar ·JSTOR(January 2023) (Learn how and when to remove this message) |
| Program execution |
|---|
| General concepts |
| Types of code |
| Compilation strategies |
| Notable runtimes |
|
| Notable compilers & toolchains |
|
Incomputing,compile time is the period of time when acompiler processessource code into other code that is more readily executable – typicallyobject code orbyte code.[1] Compile time is aphase in the operational life cycle of a program as it transitions fromdevelopment toexecution. The length of time it takes to compile is usually referred to ascompilation time althoughcompile time might also be used.
Compile time can be subdivided by the phases of a compiler. Most compilers have at least the following phases:syntax analysis,semantic analysis, andcode generation. Many compilers include one or more optimization phases. For example, each constant expressions might be evaluated viacompile-time execution to produce a value that results in improved runtime performance.[2][3]
Properties of a program that can be determined at compile time includerange-checks (e.g., proving that an array index will not exceed the array bounds),deadlock freedom inconcurrent languages, or timings (e.g., proving that a sequence of code takes no more than an allocated amount of time). For statically-typed languages such asJava orRust, types are checked at compile time to ensuretype safety.[4]
Compiling is typically part of abuild process (at build time). A build may also includelinking (at link time). Run time is the duration when the program is running.
Often, compilation occurs as a separate step before running a program. But withdynamic compilation, transformation tomachine language happens as part of the process of running it – intertwining run time and compile time. Often this is split into two distinct processes: a build-time process that converts source code to anintermediate representation (IR) and a run-time process that converts the IR to machine code.
Thiscomputer science article is astub. You can help Wikipedia byadding missing information. |