Message414842
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. |
|
Date |
User |
Action |
Args |
2022-03-10 11:28:55 | mark.dickinson | set | recipients:
+ mark.dickinson, HumberMe |
2022-03-10 11:28:55 | mark.dickinson | set | messageid: <1646911735.85.0.366326237726.issue46971@roundup.psfhosted.org> |
2022-03-10 11:28:55 | mark.dickinson | link | issue46971 messages |
2022-03-10 11:28:55 | mark.dickinson | create | |
|