Python Benchmarking
Langue : anglais
Edité par Independently Published, 2023
- Livre broché
- Neuf

Vendeur : PBShop.store UK, Fairford, GLOS, Royaume-UniPBShop.store UK
Vendeur AbeBooks depuis 11 juin 1999
Etat: Neuf
EUR 28,30
Quantité disponible : Plus de 20 disponibles
Ajouter au panierA propos de cet article
New Book. Delivered from our UK warehouse in 4 to 14 business days. THIS BOOK IS PRINTED ON DEMAND. Established seller since 2000.
N° de réf. du vendeur L0-9798865481171
- Titre
- Python Benchmarking
- Auteur
- Brownlee, Jason
- Éditeur
- Independently Published
- Année de publication
- 2023
- État de l'article
- New
- Reliure
- PAP
- Langue
- anglais
- ISBN à 13 chiffres
- 9798865481171
- Poids de l'article
- 503 grammes
- Série
- Livre 3 sur 3: Python Concurrency By Example
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.
« Synopsis » peut appartenir à une autre édition de cet ouvrage.
PBShop.store UK
Fairford, GLOS, Royaume-Uni
Vendeur AbeBooks depuis 11 juin 1999
Frais d'expédition de Royaume-Uni vers Etats-Unis
| Article | 10 à 20 jours ouvrés | 10 à 20 jours ouvrés |
|---|---|---|
| Premier article | EUR 5,99 | EUR 5,99 |
Modes de paiement
Description de la boutique
**Please note our transit times are from the date of dispatch.** We first started out as “The Paperback Exchange,” a chain of physical bookstores where we would part exchange your beloved books for new stories to transport you to faraway places. However, as shopping started to evolve to online shops and marketplaces, we bid our stores goodbye to become “PBShop.” This transition has only allowed us to blossom as we now ship thousands of titles to book lovers across the globe. We pride ourselves in being a community of local book lovers which allows our passion and devotion to shine in everything we do. In 2020 we not only celebrated our 20th birthday but our 1st birthday as being completely employee owned after becoming an E.O.T in September 2019. We are proud to be different and embrace standing apart on a book mountain by working from a virtual inventory which allows us to provide thousands of books that may be difficult to get for your bookshelf or your studies. Working with a number of different suppliers allows us to explore other avenues such as puzzles, sheet music and even stationery so we really do have something for everyone. Life is about being versatile in all realms of existence. If this is your first purchase with us, or you are a returning customer, we would like to welcome you to the PBShop family, for there is no friend as loyal as a book. We are a company who put our customers at the centre of everything we do as we understand the importance of reading because once you learn to read, you will forever be free. There are a whole lot of things in this world of ours that we are yet to explore, which is why we will forever inspire curious minds.…
Spécialité
Hardbacks, PaperbacksProfil professionnel du vendeur
Pbshop.co.uk
Unit 22 Horcott Industrial Estate, Horcott Road
Fairford, Royaume-Uni GL7 4BX
Conditions de vente
Returns Policy
We ask all customers to contact us for authorisation should they wish to return their order. Orders returned without authorisation may not be credited.
If you wish to return, please contact us within 14 days of receiving your order to obtain authorisation.
Returns requested beyond this time will not be authorised.
Our team will provide full instructions on how to return your order and once received our returns department will process your refund.
Please note the cost to return any unwanted order to us is borne by the buyer.
Should your order arrive damaged, not as advertised or faulty, we must be advised of this within 14 days of delivery. Please contact us so we can find the best solution for you.
Our Customer Care Team can be contacted by emailing alborders@paperbackshop.co.uk, or by calling our UK Office on +441285 712 917. We are available 9:00am till 5:30pm GMT Monday to Friday.
Droit de rétractation
Si vous êtes un consommateur, vous pouvez exercer votre droit de rétractation sur le contrat conformément à ce qui suit. Le mot « consommateur » désigne toute personne physique agissant à des fins qui n'entrent pas dans le cadre de son activité commerciale, artisanale ou professionnelle.
Informations concernant le droit de rétractation
Droit statutaire de rétractation
Vous avez le droit d'exercer votre droit de rétractation sur ce contrat dans les 14 jours sans donner de raison.
Le délai de rétractation expirera au bout de 14 jours à compter du jour où vous-même, ou un tiers autre que le transporteur et désigné par vous, prendrez physiquement possession de la dernière marchandise, du dernier lot ou de la dernière pièce.
Pour exercer votre droit de rétractation, remplissez électroniquement et envoyez une déclaration claire sur notre site Web, sous « Vos achats » dans « Votre compte ». Nous vous communiquerons sans délai un accusé de réception de cette rétractation sur un support durable (par exemple, par e-mail).
Pour respecter le délai de rétractation, il vous suffit d'envoyer votre message concernant l'exercice de votre droit de rétractation avant l'expiration du délai de rétractation.
Effets de la rétractation
Si vous exercez votre droit de rétractation sur ce contrat, nous vous rembourserons tous les paiements que vous avez effectués, y compris les frais de livraison (à l'exception des frais supplémentaires résultant du choix d'un mode de livraison autre que le type de livraison standard le moins cher que nous proposons).
Nous pouvons déduire du remboursement la perte de valeur de toute marchandise livrée, si la perte est le résultat d'une manipulation inutile de votre part.
Nous effectuerons le remboursement dans les meilleurs délais, et au plus tard 14 jours après le jour où nous aurons été informés de votre décision d'exercer votre droit de rétractation sur ce contrat.
Nous effectuerons le remboursement en utilisant le même moyen de paiement que celui que vous avez utilisé pour la transaction initiale, sauf si vous en avez expressément convenu autrement ; en tout état de cause, aucuns frais ne vous seront facturés à la suite d'un tel remboursement.
Nous pouvons suspendre le remboursement jusqu'à ce que nous ayons reçu les marchandises ou que vous ayez fourni la preuve que vous avez renvoyé les marchandises, en fonction de la première éventualité.
Vous devez renvoyer les marchandises ou les remettre à PBShop.store UK, Fairford, United Kingdom, +44 1285 712917, sans retard injustifié et, en tout état de cause, au plus tard 14 jours à compter du jour où vous nous avez communiqué votre décision de rétractation du présent contrat. Le délai est respecté si vous renvoyez les marchandises avant l'expiration du délai de 14 jours. Vous devrez prendre en charge les frais directs du renvoi des marchandises. Vous n'êtes responsable que de toute diminution de valeur des marchandises résultant d'une manipulation autre que celle nécessaire pour établir la nature, les caractéristiques et le fonctionnement des marchandises.
Exceptions au droit de rétractation
Le droit de rétractation ne s'applique pas à ce qui suit :
- Distribution de journaux, de revues ou de magazines, à l'exception des contrats d'abonnement ; et
- Fourniture d'un contenu numérique qui n'est pas fourni sur un support matériel (par exemple, sur un CD ou un DVD) si vous avez accepté, lors de votre commande, que nous puissions commencer à le livrer et que vous ne puissiez pas exercer votre droit de rétractation une fois la livraison commencée.
Conditions d'expédition
Orders are shipped from our UK warehouse. Delivery thereafter is between 4 and 14 business days. Please contact us if you have any queries about our services or products.