-
Notifications
You must be signed in to change notification settings - Fork 4
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
Array api #25
base: master
Are you sure you want to change the base?
Array api #25
Conversation
Added GIL release for array functions Added check_bytes_within_dist to mirror check_hexstrings_within_dist
Fixed 4 space/8 space tab problems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine. I only noted two changes before we'll want to merge. I'm not certain off-hand why you're observing that benchmark behavior, but I'd have to look further into it.
I'm comfortable merging and cutting a release after you make those changes if it suits your needs. 👍
@@ -1 +1 @@ | |||
const char _version[] = "2.2.3"; | |||
const char _version[] = "2.2.3.1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is adding to the API, let's bump at a minimum the minor version.
const char _version[] = "2.2.3.1"; | |
const char _version[] = "2.3.0"; |
@@ -172,7 +172,7 @@ static PyObject * hamming_distance_byte_wrapper(PyObject *self, PyObject *args) | |||
* @param args Python arguments for `check_hexstrings_within_dist` interface | |||
* - `string1` -- hex string | |||
* - `string2` -- hex string | |||
* @returns | |||
* @returns True if the hamming distance is less or equal to max_dist, False otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the spacing rendered as tabs, so just changing it to spaces here to stay in-line with the other docs.
* @returns True if the hamming distance is less or equal to max_dist, False otherwise. | |
* @returns True if the hamming distance is less or equal to max_dist, False otherwise. |
Added cleaner APIs for array handling (find first, best, all matches)
Added GIL release for array ops
Added docs for array ops to Readme
Added tests for array ops
Added explicit
hamming_distance_byte
to have the same interface ashamming_distance_string
. Functionally the find first array op does the same thing, but this being Python I'm weary of having two apparently interchangeable functions that have different return types, that just smells like trouble. ;)It all seems to work fine, as far as I can tell. The only thing I don't understand is the benchmarking: the
best
andall
array ops are about 2 orders of magnitude faster than thefirst
one. Either the compiler does very high-level optimization magic, or something is wrong that I can't see...Thanks!