Compilation of different languages will be explored here. All programming languages are compiled and processed by compiler right. Each language has different steps to execute the code into machine language. First will start with .Net (C#).
.Net (C#)
.NET application executed by CLR (Common Language Runtime) execution engine. Compiler convert the source code into IL(Intermediate Language) and store in an assembly (.exe or .dll). Then CLR loads the assembly and Just-in- time compiler converts IL code into native machine code. Then it will be executed by CPU.CLR also provide the memory management, security, exception handling and garbage collection.
Step 1: write C# source code
class Program
{
static void Main()
{
Console.WriteLine("Hello World");
}
}
Step 2: Compiled into IL
(.cs) convert to Intermediate language by CIL (Common Intermediate Language)
Step 3: Create assembly
This assembly is platform independent.
MyApp.exe
├── IL Code
├── Metadata
└── Manifest
Step 4: Load assembly
CLR Loads the assemblies and verify the security then Performs garbage collection process.
Step 5:
The Just-In-Time (JIT) Compiler convert (Intermediate language IL code into native machine code. Then CPU executes the generated native machine code. During execution, CLR services will support the application running.
In one-line steps:
Source Code → IL → Assembly → CLR → JIT → Native Code → Execution
Python
Python source code complied by Python Virtual Machine (PVM).its handles function execution, Memory management, Imports and runtime environment. Source code(.py) files first compiled to (.pyc) platform-independent bytecodes. Then PVM read and execute this bytecode. Only two step process simple and flexible also across operating systems.
Step 1: Create python code
Example:
print("Hello Python")
Step 2: Compiled to byte codes
compiled bytecode is stored in the pycache folder as .pyc files
pycache/ hello.cpython-313.pyc
Step 3: Execute code
Python Virtual Machine loads the bytecode and executes it instruction by instruction.
In one-line steps:
Source Code (.py) → Bytecode (.pyc) → PVM → Output
JAVA
Java source code once compiled it capable of executing Anywhere like platform independent. (.java) source code compiled by compiler as javac, then creates bytecode (.class) file. JVM load the bytecode and the JIT compiler converts it into native machine code for execution
Step 1: Write java code
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Step 2: Compile using javac
Java compiler (javac) converts the source code into Bytecode and creating .class file.
Step 3: Bytecode Generation
The .class file contains Java Bytecode, which is platform independent. This .class file can run anywhere.
Step 4:
JVM load the .class file using JIT(Just in time) compiler and converts into machine code. Also its verify security and load required classes
In one-line steps:
Source Code → compiler → javac → Bytecode (.class) → JIT → Native Code → Execution
Comparison
Feature | .NET | Python | Java |
|---|---|---|---|
Language Type | Compiled + JIT | Interpreted/Bytecode | Compiled + JIT |
Output | IL DLL/EXE | .pyc | .class |
Runtime | CLR | PVM | JVM |
Speed | Very Fast | Moderate | Fast |
EXE Creation | Yes | PyInstaller | Via Packaging |
Best For | Enterprise/Desktop/Web | AI/Data/Automation | Enterprise |

Join the conversation! Your thoughts help the community grow.