Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: speed up int_to_bluetooth_address C implementation #52

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

akx
Copy link
Contributor

@akx akx commented Jul 29, 2024

Similar to bdraco/ulid-transform#43.

I think the previous implementation also had a memory leak, unless Cython somehow implicitly took care of free()ing the mallocated bdaddr.


Seems to be a 12.5% speed improvement on test_parse_int_to_bluetooth_address_uncached on my machine.

Copy link

codecov bot commented Jul 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (595c65a) to head (4d8f9a8).
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #52   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          230       230           
  Branches        34        34           
=========================================
  Hits           230       230           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco merged commit 7d46575 into Bluetooth-Devices:main Jul 29, 2024
21 checks passed
@akx akx deleted the avoid-malloc branch September 19, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants