Skip to Content
Python Algorithms: Mastering Basic Algorithms in the Python Language, Second Edition
book

Python Algorithms: Mastering Basic Algorithms in the Python Language, Second Edition

by Magnus Lie Hetland
September 2015
Intermediate to advanced
320 pages
12h 30m
English
Apress
Content preview from Python Algorithms: Mastering Basic Algorithms in the Python Language, Second Edition

APPENDIX A

image

Pedal to the Metal: Accelerating Python

Make it work, make it right, make it fast.

— Kent Beck

This appendix is a tiny peek at some of the options for tweaking the constant factors of your implementations. Although this kind of optimization in many cases won’t take the place of proper algorithm design—especially if your problems can grow large—making your program run ten times as fast can indeed be useful.

Before calling for external help, you should make sure you’re using Python’s built-in tools to their full potential. I’ve given you some pointers throughout the book, including the proper uses of list versus deque and how bisect ...

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

Python 3: Project-based Python, Algorithms, Data Structures

Python 3: Project-based Python, Algorithms, Data Structures

Mashrur Hossain

Publisher Resources

ISBN: 9781484200551Purchase book