diff --git a/bench/int_to_bluetooth_address.py b/bench/int_to_bluetooth_address.py new file mode 100644 index 0000000..ea92e67 --- /dev/null +++ b/bench/int_to_bluetooth_address.py @@ -0,0 +1,12 @@ +import timeit + +from bluetooth_data_tools.utils import _int_to_bluetooth_address + + +def parse_adv() -> None: + _int_to_bluetooth_address(0) + + +count = 10000000 +time = timeit.Timer(parse_adv).timeit(count) +print(f"Parsing {count} bluetooth addresses took {time} seconds") diff --git a/build_ext.py b/build_ext.py index 9ddd870..94130b9 100644 --- a/build_ext.py +++ b/build_ext.py @@ -15,7 +15,7 @@ [ join("src", "bluetooth_data_tools", "_utils_impl.pyx"), ], - language="c++", + language="c", )