Skip to content

Instantly share code, notes, and snippets.

@pamelafox
Created November 8, 2021 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pamelafox/27ebdf8da4bd1762b1a06241adc0f420 to your computer and use it in GitHub Desktop.
Save pamelafox/27ebdf8da4bd1762b1a06241adc0f420 to your computer and use it in GitHub Desktop.
compiled_slide.html
<section>
<h3>Compiled vs. interpreted</h3>
<p class="padded">When a program is <strong>compiled</strong>, the source code is translated into machine code,
and that code can be distributed and run repeatedly.</p>
<p class="smaller"><code>Source code → Compiler → Machine code → Output</code></p>
<p>When a program is <strong>interpreted</strong>, an interpreter
runs the source code directly (without compiling it first).</p>
<p class="smaller"><code>Source code → Interpreter → Output</code></p>
<div class="fragment">
<p class="padded">In its most popular implementation (CPython), Python programs are interpreted but have a compile step:</p>
<p style="font-size:0.8em;"><code>Source code → Compiler → Bytecode → Virtual Machine → Output</code></p>
</div>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment