Зміст курсу
Optimization Techniques in Python
Optimization Techniques in Python
Introduction to Python Performance
In order to feel confident and successfully complete this course, we strongly recommend you complete the following courses beforehand (just click on them to start):
The Algorithms and Data Structures Overview course is not compulsory, however, it provides some theoretical background about algorithms and data structures.
How Python Executes Code
Python is often called an interpreted language, but it actually involves an intermediate compilation step. When you run Python code, it’s first compiled into bytecode, an intermediate form. This compilation happens automatically and is usually transparent to the user. Bytecode is stored in .pyc
files to speed up future executions.
Afterward, the .pyc
files are executed by the Python Virtual Machine (PVM).
While this process offers flexibility, the overhead of bytecode interpretation can make Python slower for tasks like loops, complex calculations, or large data manipulation.
However, Python's flexibility, along with its built-in functions and external libraries, allows for performance optimizations without needing to change its core execution model.
Common Performance Bottlenecks
The first step in solving any performance problem is to identify it, so let's list the most common performance bottlenecks:
Throughout this course, we will focus on specific techniques and tools to address these issues and write more efficient Python programs. Without further ado, let's dive right in!
Дякуємо за ваш відгук!