10 lines
No EOL
354 B
Python
10 lines
No EOL
354 B
Python
import timeit
|
|
from yaml import (load as yload, Loader)
|
|
import sryaml
|
|
|
|
metamodel = 'data/meta.yaml'
|
|
pyyaml_time = timeit.timeit("yload(metamodel, Loader=Loader)", globals=globals(), number=1000)
|
|
sryaml_time = timeit.timeit("sryaml.load(metamodel)", globals=globals(), number=1000)
|
|
|
|
print(f"pyyaml time: {pyyaml_time}")
|
|
print(f"sryaml time: {sryaml_time}") |