Created
November 8, 2021 04:10
-
-
Save pamelafox/27ebdf8da4bd1762b1a06241adc0f420 to your computer and use it in GitHub Desktop.
compiled_slide.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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