mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
This commit adds tests to benchmark the performance of class instantiation. Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
15 lines
142 B
Python
15 lines
142 B
Python
import bench
|
|
|
|
|
|
class X:
|
|
def __init__(self):
|
|
pass
|
|
|
|
|
|
def test(num):
|
|
for i in range(num // 5):
|
|
x = X()
|
|
|
|
|
|
bench.run(test)
|