From 1cfceaba0bcbf044033dbbdafe55254d41a9e3b7 Mon Sep 17 00:00:00 2001 From: tactonbishop Date: Sat, 15 Oct 2022 15:00:04 +0100 Subject: [PATCH] Last Sync: 2022-10-15 15:00:04 --- Hardware/Logic_Gates/Creating_memory_with_NAND.md | 2 +- .../Python/Concepts/Python_interpreter.md | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Hardware/Logic_Gates/Creating_memory_with_NAND.md b/Hardware/Logic_Gates/Creating_memory_with_NAND.md index 71a6034..2fe5cf7 100644 --- a/Hardware/Logic_Gates/Creating_memory_with_NAND.md +++ b/Hardware/Logic_Gates/Creating_memory_with_NAND.md @@ -4,7 +4,7 @@ categories: - Computer Architecture - Electronics - Hardware -tags: [logic-gates, binary] +tags: [logic-gates, binary, memory] --- # Creating memory with NAND gates diff --git a/Programming_Languages/Python/Concepts/Python_interpreter.md b/Programming_Languages/Python/Concepts/Python_interpreter.md index d14ae97..fc31213 100644 --- a/Programming_Languages/Python/Concepts/Python_interpreter.md +++ b/Programming_Languages/Python/Concepts/Python_interpreter.md @@ -20,7 +20,7 @@ There are three main implementations: - CPython - The default implementation, written in C - Jython - - Java + - Python implemented by Java and running on the JVM - PyPy - A subset of Python which is faster due to machine code compilation @@ -32,7 +32,14 @@ When Python runs in this implementation, code written in C converts it to byteco The fact that Python does not compile to binary means that it can run on a greater variety of hardwares however it is slower than a language that compiles to machine code. PyPy is a solution for this because it is both interpreted and compiled to optimised machine code at run time. -// TODO: +Where CPython is the interpreter, Python extensions can be written in C. -- Notes on Jython and PyPy -- What are the benefits of using one over the other? e.g. how you write C modules that are understood by Python. +## PyPy + +PyPy is an alternative implementation to CPython. The main difference is that it uses a JIT-compiler and doesn't convert Python to the intermediary byte code. It is also written in Python itself, specifically RPython ('restricted Python'). This is capable of converting Python directly to machine code without the CPython virtual machine. + +## Jython + +Jython is an implementation of Python written in Java. Like CPython it converts Python to bytecode but this runs on the JVM. As it is written in Java, a Jython program can import and use any Java class. + +Where Jython is the interpreter, Python extension can be written in Java.