tests/bench: Add testcase to compare bytes(N) vs b"\0" * N.

Based on python-dev discussion regarding PEP467.
crypto-aes
Paul Sokolovsky 7 years ago
parent bba77a2d01
commit e918fc5e37

@ -0,0 +1,7 @@
import bench
def test(num):
for i in iter(range(num // 1000)):
bytes(10000)
bench.run(test)

@ -0,0 +1,7 @@
import bench
def test(num):
for i in iter(range(num // 1000)):
b"\0" * 10000
bench.run(test)
Loading…
Cancel
Save