micropython/tests/bench/bytealloc-2-repeat.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
107 B
Python

import bench
def test(num):
for i in iter(range(num // 1000)):
b"\0" * 10000
bench.run(test)