Hacker News new | ask | show | jobs
by tanujjain 2442 days ago
That sounds good! Would be great if you can share the code, or even better, make a PR to the repo.
1 comments

The implementation is trivial, for speed we use:

cdef extern int __builtin_popcountll(unsigned long long) nogil

dist = __builtin_popcountll(key ^ phash)

It would only take a couple of minutes to fill out the rest.