New submission from Kumar Aditya <rahuladitya...@gmail.com>:
The attached PR speeds up bytearray creation from list and tuple. Benchmark (uses pyperf): ----------------------------------------------------- import pyperf runner = pyperf.Runner() runner.timeit(name="bench bytearray", stmt="bytearray([42]*10000)",) ----------------------------------------------------- Results: ----------------------------------------------------- Mean +- std dev: [base] 74.8 us +- 5.5 us -> [patch] 53.2 us +- 3.3 us: 1.41x faster ----------------------------------------------------- ---------- components: Interpreter Core messages: 414987 nosy: gvanrossum, kumaraditya303 priority: normal pull_requests: 29935 severity: normal status: open title: Speed up bytearray creation from list and tuple type: performance versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46993> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com