diff --git a/tests/bench/from_iter-1-list_bound.py b/tests/bench/from_iter-1-list_bound.py new file mode 100644 index 0000000000..d209daecc5 --- /dev/null +++ b/tests/bench/from_iter-1-list_bound.py @@ -0,0 +1,8 @@ +import bench + +def test(num): + for i in iter(range(num//10000)): + l = [0] * 1000 + l2 = list(l) + +bench.run(test) diff --git a/tests/bench/from_iter-2-list_unbound.py b/tests/bench/from_iter-2-list_unbound.py new file mode 100644 index 0000000000..be019c52fe --- /dev/null +++ b/tests/bench/from_iter-2-list_unbound.py @@ -0,0 +1,8 @@ +import bench + +def test(num): + for i in iter(range(num//10000)): + l = [0] * 1000 + l2 = list(map(lambda x: x, l)) + +bench.run(test) diff --git a/tests/bench/from_iter-3-tuple_bound.py b/tests/bench/from_iter-3-tuple_bound.py new file mode 100644 index 0000000000..7b7fa36c6e --- /dev/null +++ b/tests/bench/from_iter-3-tuple_bound.py @@ -0,0 +1,8 @@ +import bench + +def test(num): + for i in iter(range(num//10000)): + l = [0] * 1000 + l2 = tuple(l) + +bench.run(test) diff --git a/tests/bench/from_iter-4-tuple_unbound.py b/tests/bench/from_iter-4-tuple_unbound.py new file mode 100644 index 0000000000..7c7f134c85 --- /dev/null +++ b/tests/bench/from_iter-4-tuple_unbound.py @@ -0,0 +1,8 @@ +import bench + +def test(num): + for i in iter(range(num//10000)): + l = [0] * 1000 + l2 = tuple(map(lambda x: x, l)) + +bench.run(test) diff --git a/tests/bench/from_iter-5-bytes_bound.py b/tests/bench/from_iter-5-bytes_bound.py new file mode 100644 index 0000000000..b793a3207e --- /dev/null +++ b/tests/bench/from_iter-5-bytes_bound.py @@ -0,0 +1,8 @@ +import bench + +def test(num): + for i in iter(range(num//10000)): + l = [0] * 1000 + l2 = bytes(l) + +bench.run(test) diff --git a/tests/bench/from_iter-6-bytes_unbound.py b/tests/bench/from_iter-6-bytes_unbound.py new file mode 100644 index 0000000000..20aa556277 --- /dev/null +++ b/tests/bench/from_iter-6-bytes_unbound.py @@ -0,0 +1,8 @@ +import bench + +def test(num): + for i in iter(range(num//10000)): + l = [0] * 1000 + l2 = bytes(map(lambda x: x, l)) + +bench.run(test) diff --git a/tests/bench/from_iter-7-bytearray_bound.py b/tests/bench/from_iter-7-bytearray_bound.py new file mode 100644 index 0000000000..72001a05c7 --- /dev/null +++ b/tests/bench/from_iter-7-bytearray_bound.py @@ -0,0 +1,8 @@ +import bench + +def test(num): + for i in iter(range(num//10000)): + l = [0] * 1000 + l2 = bytearray(l) + +bench.run(test) diff --git a/tests/bench/from_iter-8-bytearray_unbound.py b/tests/bench/from_iter-8-bytearray_unbound.py new file mode 100644 index 0000000000..e2263b8ef9 --- /dev/null +++ b/tests/bench/from_iter-8-bytearray_unbound.py @@ -0,0 +1,8 @@ +import bench + +def test(num): + for i in iter(range(num//10000)): + l = [0] * 1000 + l2 = bytearray(map(lambda x: x, l)) + +bench.run(test)