[Python-Dev] Python startup time
Steven D'Aprano
steve at pearwood.info
Wed Jul 19 21:19:25 EDT 2017
On Wed, Jul 19, 2017 at 04:11:24PM -0700, Chris Barker wrote:
> As long as we are talking anecdotes:
>
> If it could save a person’s life, could you find a way to save ten seconds
> off the boot time? If there were five million people using the Mac, and it
> took ten seconds extra to turn it on every day, that added up to three
> hundred million or so hours per year people would save, which was the
> equivalent of at least one hundred lifetimes saved per year.
>
> Steve Jobs.
And about a fifth of the time they spent standing in lines waiting to
buy the latest unnecessary iGadget...
But seriously, that calculation is completely bogus. Not only is Steve
Job's arithmetic *completely* wrong, but the whole premise is nonsense.
Do the maths yourself: ten seconds per day is 3650 seconds in a year,
which is slightly over an hour (3600 seconds). Multiply by five million
users, that's about five million hours, not 300 million. So Jobs
exaggerates the time saved by a factor of sixty.
(Or maybe Jobs was warning that Macs crash sixty times a day...)
But the premise is wrong too. Those hypothetical people don't turn their
Macs on in sequence, each person turning their computer on only after
the previous person's Mac had finished booting. They effectively boot
them up in parallel but offset, spread out over a 24 hour period, so
about 3472 people booting up at the same time each minute of the day.
Time savings for parallel processes don't add in the way Jobs adds them,
if we treat this as 1440 parallel processes (one per minute of the day)
we save 1440 hours a year.
But really, the only meaningful calculation is the each person saves 10
seconds per day. We can't even meaningfully say they save one hour a
year: it doesn't come nicely packaged up for you all at once, so you can
actually do something useful with it, nor can you save those ten seconds
from one day to the next. You only get one shot at using them. What can
you do with ten seconds per day? By the time you decide what to do with
the extra time, it's already gone.
There are good reasons for speeding up boot time, but this sort of
calculation is not one of them. I think it is in particularly bad taste
to exaggerate the significance of it by putting it in terms of saving
lives. You want to save real lives? How about fixing the conditions in
the sweatshops that make Apple phones? And installing suicide nets
around the building doesn't count.
--
Steve
More information about the Python-Dev
mailing list