February 2017
Beginner to intermediate
416 pages
10h 39m
English
This chapter discusses ways that your code can be made to run faster. It roughly breaks into two very distinct topics:
The first of these topics relates to figuring out which algorithms are fundamentally, theoretically better than others. The second topic is about how to eke out real-world performance gains for whatever abstract algorithm you are using.
The following script examines two different ways to solve the same problem: given a list of items, count how many of the entries are duplicates of some other entry. It sees how long each algorithm takes for lists of varying length and plots out the time.
The two ways I solve the problem are as follows:
Read now
Unlock full access