
In this lecture, you’ll see first-hand - the default computational performance of Python using the official runtime and standard built-in data types. I will demonstrate this by implementing a simple prime number generator in Python and running it on a streamlined Linux setup ( Raspberry Pi OS based on Debian GNU/Linux 12 ) on a Raspberry Pi 4 Model B with 8 GB of RAM. This minimalist setup is chosen to make the performance results easily reproducible, offering you an accurate understanding of Python’s baseline speed in handling computational tasks.
In this lecture, you will learn how to implement a prime number generator in Java programming language using the modern Java syntax. You will learn the syntax differences and the features of the Java programming language in comparison to Python. You will also notice the performance of a Java program in comparison to Python program while implementing similar computational algorithm. You will also gain high-level insights on design and programming idioms inherent in Java.
In this lecture, you will learn how to implement a prime number generator in the C and C++ programming languages. You will also learn about the computational performance of programs written in C and C++ in comparison to similar code written in Java and Python. You will also gain high-level insights on design and programming idioms of code written in C and C++ covering the features and limitations.
In this lecture, you will learn how to implement a prime number generator using the Rust programming language. You will also learn about the computational performance of programs written in Rust in comparison to C/C++/Java/Python. You will also gain high-level insights on what makes Rust programming language popular in 2024 - its features, similarities and differences in comparison to Python
In this lecture, you will learn how to implement the code for generating prime numbers in the Go programming language. You will learn about the high-level syntax differences and similarities of Go language in comparison to Python, Java, C, C++ and Rust. You will also again high-level insights of features of Go programming language that has made it attractive for developers. You will also notice the computational performance of a program written using Go in comparison to similar code written in Python, C, C++, Java and Rust.
In this lecture, we will summarize the concepts learnt so far in the earlier lectures - comparing the computational performance of code written in Python, Java, C, C++, Rust and Go programming languages. You will gain insights on choosing the right programming language for a given task while knowing the benefits and limitations of each programming language that we have discussed earlier. You will also learn why programs written in Python are slow out-of-the-box in comparison to other programming languages that we chose.
In this lecture, you will learn how to use PyPy to improve performance of pure python code. You will learn the difference between the official Python runtime implementation (CPython) and PyPy. You will learn about the history, features and benefits of using PyPy over CPython. You will also learn about limitations of using PyPy for our python projects and some best practices and use-case scenarios for PyPy.
In this lecture, we will explore the Cython project. Cython provides the means to create extension libraries largely using Python language syntax while generating native extension libraries that come close the performance of C / C++. You will learn about Cython features, refactoring your code to be cython compatible, building and loading cythonized modules using monkey-patching technique and also about the modern Cython syntax versus the legacy syntax. You will also learn the limitations of using Cython in your python code base and some of the best practices/approaches towards code refactoring to use Cython.
In this lecture, you will learn the basics of using numba package to improve performance of your Python code. You will learn the overview features of numba and the best use-case practices and its limitations.
In this lecture, we will have a brief overview on Pythran and Codon - the other utilities that can be used to improve performance of Python code. You will learn how to use them in your python projects, and how they compare to Cython, Numba and PyPy.
On this longer lecture - I will demonstrate performance of threads in C, C++, Java, Rust, Go and Python by implementing a prime number generator program that uses the same algorithm and program structure while being implemented in different languages. This way, we can compare the performance of each implementation and understand the reason for fast or slow performance with each language implementations.
In this lecture, you will learn the tips and techniques to improve thread performance in your python code. You will learn about the performance improvements and differences while using PyPy, using processes instead of threads, numba, cython, pythran and codon. You will learn the best practices and choosing the appropriate techniques for your use-case requirements.
There's a famous quote that says "If you want to code faster, use Python; but if you want your code to run faster - just use C"!
In this course - Python Performance Hacks - Part 1: Make Your Code Run Faster, I will teach how to make your python code run as fast as those written in C/C++/Rust. You will learn practical, hands-on techniques to enhance the speed and efficiency of your Python applications. This course is designed for Python developers who want to maximize performance without sacrificing code readability or maintainability. Whether you’re developing web applications, data analysis scripts, or backend processes, you'll find the skills to optimize your code for high performance without sacrificing the great features, benefits and the essence of Python programming language.
In this course, we’ll dive into the essential strategies for improving Python performance, covering tools and alternative language runtimes that perform Just-In-Time compilation, Ahead-Of-Time optimization and much more. You will learn how to make your python code run fast comparable to code written in C/C++/Rust. You will also learn about the best practices and use-case scenarios for these tools in your python code. You will also learn tricks to parallelize threads (circumventing the limitations of Global-Interpreter-Lock or GIL).
By the end of this course, you'll have a toolkit of performance-enhancing techniques to take your Python skills to the next level. Say goodbye to slow-running programs and hello to code that’s lean, powerful, and optimized for speed. Enroll to this course to transform your Python skills and make your code run faster than ever!