Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Introduction to Python Performance | Understanding and Measuring Python Performance
Optimization Techniques in Python
course content

Зміст курсу

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, and then executed by the Python Virtual Machine (PVM).

This compilation happens automatically and is usually transparent to the user. Bytecode is stored in .pyc files to speed up future executions. 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!

How is Python code executed?

Виберіть правильну відповідь

Все було зрозуміло?

Секція 1. Розділ 1
We're sorry to hear that something went wrong. What happened?
some-alt