> For the complete documentation index, see [llms.txt](https://til.notdu.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://til.notdu.com/back-end/programming-languages/compiled-vs-interpreted.md).

# Compiled vs Interpreted

| Compiled                                                                                                      | Interpreted                                                                                           |
| ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| compiler is a program that translates statements from programming language to another language (machine code) | Translating each statement into a sequence of one or more subroutines and then into machine code      |
| Not on the fly                                                                                                | On the fly                                                                                            |
| Speed of execution: executable can be directly executed on the target machine                                 | Nowadays, interpreted compiles into bytecode first -> prepare and optimize for further interpretation |
| Programs have to be compiled for a specific cpu architecture                                                  | There are not many fully interpreted languages left                                                   |
| Long compilation time                                                                                         | Faster compilation: for the implementations that compile to bytecode                                  |
| C, Go, Rust,..                                                                                                | Slower execution speed, potential for leaking source code                                             |
|                                                                                                               | JS                                                                                                    |

JIT (Just in time):&#x20;

* hybrid between normal compilation and interpretation
* Store already compiled machine code (base on how often a piece of code is executed)

![](/files/Psfqgt4se1Ahr19XUxCk)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://til.notdu.com/back-end/programming-languages/compiled-vs-interpreted.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
