mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 11:10:14 +01:00
This commit adds tests to benchmark the performance of class instantiation. Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
14 lines
133 B
Python
14 lines
133 B
Python
import bench
|
|
import gc
|
|
|
|
X = object
|
|
|
|
|
|
def test(num):
|
|
for i in range(num // 5):
|
|
x = X()
|
|
gc.collect()
|
|
|
|
|
|
bench.run(test)
|