Skip to Content
Advanced Python Development: Using Powerful Language Features in Real-World Applications
book

Advanced Python Development: Using Powerful Language Features in Real-World Applications

by Matthew Wilkes
July 2020
Intermediate to advanced
620 pages
13h 42m
English
Apress
Content preview from Advanced Python Development: Using Powerful Language Features in Real-World Applications
© Matthew Wilkes 2020
M. WilkesAdvanced Python Developmenthttps://doi.org/10.1007/978-1-4842-5793-7_10

10. Speeding things up

Matthew Wilkes1 
(1)
Leeds, West Yorkshire, UK
 

There are two main approaches to improving the speed of code: optimizing the code we’ve written and optimizing the control flow of the program to run less code. People often focus on optimizing the code rather than the control flow because it’s easier to make self-contained changes, but the most significant benefits are usually in changing the flow.

Optimizing a function

The first step to optimizing a function is having a good understanding of it’s performance before making any changes. The Python standard library has a profile module to assist with this. Profile introspects code ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Advanced Python 3 Programming Techniques

Advanced Python 3 Programming Techniques

Mark Summerfield
Intuitive Python

Intuitive Python

David Muller

Publisher Resources

ISBN: 9781484257937Purchase LinkPublisher Website