LIBRISTO
LIBROAMANTO
Obligatoire
Accédez à une communauté d'amateurs de livres à travers le monde et bénéficiez d’une panoplie d'avantages. Créer un compte gratuitement
0
Livraison gratuite avec Zásilkovna à partir de 69.99 €
Coursier DPD 6.49 € Point Bpost 8.49 € Bpost 7.99 € Point DPD 3.99 € Service de messagerie GLS 5.49 €

Livraison gratuite à partir de 69.99 euros.

Python Benchmarking

Measure The Execution Time Of Python Code With The time And timeit Modules

Langue AnglaisAnglais
Livre Livre de poche
Livre Python Benchmarking Jason Brownlee
Code Libristo: 51111397
Éditeurs Independently published, octobre 2023
Without benchmarking, we're working in the dark.Python code can be slow.Benchmarking is a way of dis... Description détaillée
? points 64 b
26.00 €
Livraison après Noël ▾ Stockage externe Expédition sous 14-21 jours

Jusqu'à 30 jours pour les retours

Without benchmarking, we're working in the dark.

Python code can be slow.

Benchmarking is a way of discovering exactly how long code takes to execute. Without benchmarking, we have no idea whether changes make code run faster or not.

You need to know:
  • How to benchmark statements, functions, and programs using the time module.
  • How to develop benchmarking helper functions, context managers, and decorators.
  • How to benchmark snippets of code using the timeit module.

Benchmarking is required to develop fast Python code.

Python provides 5 built-in functions for reporting the current time. The problem is, that many developers use just one, the time() function, and are unaware of how inappropriate it is for benchmarking. Instead, we should be using the perf_counter() function.

Python also provides the timeit module with API and command line interface specifically designed for benchmarking. It encodes best practices such as repeated execution of target code and use of a high-precision timing function. Nevertheless, few developers use it because it is confusing. The trick is to adopt the "timeit" mindset.

Introducing: "Python Benchmarking". A new book designed to teach you how to bring modern benchmarking practices to your projects, super fast!

You will get fast-paced tutorials showing you how to benchmark your Python code, as well as some much-needed advice on advanced topics, such as:
  • How to benchmark asyncio programs and coroutines.
  • How to choose the precision and units of measure when reporting benchmark results.
  • Why it is a good idea to repeat benchmark tests many times and report average results.
  • How profiling is not benchmarking but can help in deciding what to optimize.

Each tutorial is carefully designed to teach one critical aspect of how to effectively benchmark Python code.

Table of Contents
  • Tutorial 01: Introduction.
  • Tutorial 02: Benchmarking Python.
  • Tutorial 03: Benchmarking With time.time()
  • Tutorial 04: Benchmarking With time.monotonic()
  • Tutorial 05: Benchmarking With time.perf_counter()
  • Tutorial 06: Benchmarking With time.thread_time()
  • Tutorial 07: Benchmarking With time.process_time()
  • Tutorial 08: Comparing time Module Functions
  • Tutorial 09: Benchmark Metrics
  • Tutorial 10: Benchmark Repetition
  • Tutorial 11: Benchmark Reporting
  • Tutorial 12: Benchmark Helper Function
  • Tutorial 13: Benchmark Stopwatch Class
  • Tutorial 14: Benchmark Context Manager
  • Tutorial 15: Benchmark Function Decorator
  • Tutorial 16: Gentle Introduction to Asyncio
  • Tutorial 17: Benchmarking Asyncio With loop.time()
  • Tutorial 18: Benchmark Helper Coroutine
  • Tutorial 19: Benchmark Asynchronous Context Manager
  • Tutorial 20: Benchmark Coroutine Decorator
  • Tutorial 21: Benchmarking With The timeit Module
  • Tutorial 22: Benchmarking With timeit.timeit()
  • Tutorial 23: Benchmarking With The timeit Command Line
  • Tutorial 24: Profile Python Code
  • Tutorial 25: Benchmarking With The time Command
  • Tutorial 26: Conclusions

Learn Python benchmarking correctly, step-by-step.

Actrice & Polyglotte
EWA KASP pro
Regarder la vidéo
Ewa Kasp
Libristo propose la plus grande sélection littéraire en langues étrangères. N’hésitez plus et venez y acheter vos livres.

À propos du livre

Nom complet Python Benchmarking
Langue Anglais
Reliure Livre - Livre de poche
Date de parution 2023
Nombre de pages 378
EAN 9798865481171
Code Libristo 51111397
Poids 506
Dimensions 152 x 229 x 20
Offrez ce livre dès aujourd'hui
C’est simple
1 Ajouter au panier et choisir l'option Livrer comme cadeau à la caisse. 2 Nous vous enverrons un bon d'achat 3 Le livre arrivera à l'adresse du destinataire

Connexion

Connectez-vous à votre compte. Vous n'avez pas encore de compte Libristo ? Créez-en un maintenant !

 
Obligatoire
Obligatoire

Vous n'avez pas encore de compte ? Découvrez les avantages d’avoir un compte Libristo !

Avec un compte Libristo, vous aurez tout sous contrôle.

Créer un compte Libristo
Conseiller littéraire Libroamiko
Bonjour, je suis Libroamiko, puis-je vous aider ?