Skip to Content
How to Make Things Faster
book

How to Make Things Faster

by Cary Millsap
June 2023
Intermediate to advanced
356 pages
5h 32m
English
O'Reilly Media, Inc.
Content preview from How to Make Things Faster

Chapter 68. Linear Behavior

Imagine a profile as a spreadsheet, where the total duration for a line is the product of the execution count and the mean duration per execution:

  A B C D
1 Event Duration Executions Mean dur/exec
2 A =C2*D2 ? ?
3 B =C3*D3 ? ?
4 C =C4*D4 ? ?
5 Total =SUM(B2:B4) =SUM(C2:C4) =B5/C5

This is an easy way to see why there are only two ways you can make something go faster:

  • You can reduce an execution count (a value in column C); or

  • You can reduce a mean duration per execution (a value in column D).

Because each value in column B is the product of its row-mates in columns C and D, it’s easy to see what will happen if you change one of the input values. For example:

  • If you multiply the value of cell C2 by 0.2, then the value of cell B2 will become 0.2 times its original value.

  • If you cut D3 to 0.09 times its original value, then B3 will drop to 0.09 times its original value.

  • If you multiply C4 by 0.50 and D4 by 0.33, then B4 will become 0.50 × 0.33 times its original value.

And of course, each of these changes will propagate into the sum in cell B5.

Predicting the answers to what-if questions this way is simple. The only trick is knowing what changes to make to the shaded region of the worksheet. Sometimes, because of skew, interdependencies, and queueing, the numbers you’ll choose for your prediction may not be as obvious as you’d think.

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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Improve Your Problem-Solving Skills

Improve Your Problem-Solving Skills

Charles Humble

Publisher Resources

ISBN: 9781098147051Errata Page