Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
> 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 ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42706> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com