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 mark.dickinson
Recipients HumberMe, mark.dickinson
Date 2022-03-10.11:28:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646911735.85.0.366326237726.issue46971@roundup.psfhosted.org>
In-reply-to
Content
This is expected. Your timing measures the time for garbage collection of the large arrays in addition to the time for the result to be returned.

In the line `result = myfunc()`, the name `result` gets rebound to the value of `myfunc()`. That means that `result` is unbound from whatever it was previously bound to, and the old value then gets garbage collected.

You can test this by adding a "del result" line as the last line inside the "for" loop block.
History
Date User Action Args
2022-03-10 11:28:55mark.dickinsonsetrecipients: + mark.dickinson, HumberMe
2022-03-10 11:28:55mark.dickinsonsetmessageid: <1646911735.85.0.366326237726.issue46971@roundup.psfhosted.org>
2022-03-10 11:28:55mark.dickinsonlinkissue46971 messages
2022-03-10 11:28:55mark.dickinsoncreate