This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients Anthony Sottile, BTaskaya, steven.daprano
Date 2021-01-24.09:38:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611481137.18.0.703214579228.issue43014@roundup.psfhosted.org>
In-reply-to
Content
Just for the record:

> The optimization takes the execution from ~6300ms to ~4500ms on my machine (representing a 28% - 39% improvement depending on how you calculate it)

The correct answer is 28%, which uses the initial value as the base: (6300-4500)/6300 ≈ 28%. You are starting at 6300ms and speeding it up by 28%:

>>> 6300 - 28/100*6300
4536.0

Using 4500 as the base would only make sense if you were calculating a slowdown from 4500ms to 6300ms: we started at 4500 and *increase* the time by 39%:

>>> 4500 + 39/100*4500
6255.0


Hope this helps.
History
Date User Action Args
2021-01-24 09:38:57steven.dapranosetrecipients: + steven.daprano, Anthony Sottile, BTaskaya
2021-01-24 09:38:57steven.dapranosetmessageid: <1611481137.18.0.703214579228.issue43014@roundup.psfhosted.org>
2021-01-24 09:38:57steven.dapranolinkissue43014 messages
2021-01-24 09:38:57steven.dapranocreate