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 Performance
Optimization Techniques in Python
course content

Conteúdo do Curso

Optimization Techniques in Python

Optimization Techniques in Python

1. Understanding and Measuring Performance
2. Efficient Use of Data Structures
3. Enhancing Performance with Built-in Tools

bookIntroduction to Python Performance

In order to feel confident and successfully complete this course, we strongly recommend you complete the following courses beforehand:

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, which helps 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 such as loops, complex calculations, or large data manipulation compared to languages like C, C++, C#, or Java.

However, Python's flexibility, combined with its built-in functions and external libraries, enables performance optimizations without altering its core execution model. This course will teach you exactly how to achieve that.

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?

How is Python code executed?

Selecione a resposta correta

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 1
We're sorry to hear that something went wrong. What happened?
some-alt