kopia lustrzana https://github.com/micropython/micropython
tests/bench: Add testcase to compare bytes(N) vs b"\0" * N.
Based on python-dev discussion regarding PEP467.pull/2080/merge
rodzic
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)
|
Ładowanie…
Reference in New Issue