circuitpython/tests/bench/bytealloc-1-bytes_n.py
Paul Sokolovsky e918fc5e37 tests/bench: Add testcase to compare bytes(N) vs b"\0" * N.
Based on python-dev discussion regarding PEP467.
2016-06-08 14:28:18 +03:00

8 lines
106 B
Python

import bench
def test(num):
for i in iter(range(num // 1000)):
bytes(10000)
bench.run(test)