Files
connect/tests/timings.py
Joe SpadolaandGitHub 55dcd7db4c Replace pylint with ruff for linting and formatting (#703)
* migrate from pylint to ruff

* ruff format/lint switch over

* add formatting commit

* update changelog
2026-04-02 16:09:59 -07:00

21 lines
431 B
Python

import array
from datetime import datetime
b = bytearray()
start = datetime.now()
for _x in range(10000):
b = bytearray()
a = array.array("H", list(range(5000)))
b += a
print(str(len(b)) + " " + str(datetime.now() - start))
start = datetime.now()
for _x in range(10000):
b = bytearray()
for y in range(5000):
b.extend(y.to_bytes(2, "little"))
print(str(len(b)) + " " + str(datetime.now() - start))