In computer science, run time, runtime or execution time is the time during which a program is running (executing), in contrast to other phases of a program’s lifecycle such as compile time, link time and load time. A run-time error is detected after or during the execution (running state) of a program, whereas a compile-time error is detected by the compiler before the program is ever executed. Type checking, register allocation, code generation, and code optimization are typically done at compile time, but may be done at run time depending on the particular language and compiler.