Message383540
> does the call/return really add that much overhead?
Yes, it does.
$ python3.9 -m timeit -s 'x=3.5' 'x**2'
5000000 loops, best of 5: 63.5 nsec per loop
$ python3.9 -m timeit -s 'x=3.5' -s 'f=lambda x: x**2' 'f(x)'
2000000 loops, best of 5: 136 nsec per loop |
|
Date |
User |
Action |
Args |
2020-12-21 17:35:04 | rhettinger | set | recipients:
+ rhettinger, serhiy.storchaka, Scott Norton |
2020-12-21 17:35:04 | rhettinger | set | messageid: <1608572104.9.0.903923938403.issue42706@roundup.psfhosted.org> |
2020-12-21 17:35:04 | rhettinger | link | issue42706 messages |
2020-12-21 17:35:04 | rhettinger | create | |
|