You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment in entitymatch.cffi_filter_similarity_k we pass in two lists of bloom filters, but we end up calling the native code n times. This issue is to move that iteration into C.
We also are dealing with "nice" python bitarrays which require some manipulation (1) before passing into native code. We might want to consider adding an accelerated interface that takes our custom bit packed data as plain python bytes.
1: [ffi.new("char[128]", bytes(f[0].tobytes())) for f in filters1]
Branch feature-direct-cffi builds ontop of that with a look at accessing bitarray data from C without a memcopy. Only does a bitarray popcount for now.
# Assume ba is a bitarrayaddr=ba.buffer_info()[0]
pntr=ffi.cast("char *", addr)
lib.popcount(pntr)
The text was updated successfully, but these errors were encountered:
At the moment in
entitymatch.cffi_filter_similarity_k
we pass in two lists of bloom filters, but we end up calling the native coden
times. This issue is to move that iteration into C.We also are dealing with "nice" python bitarrays which require some manipulation (1) before passing into native code. We might want to consider adding an accelerated interface that takes our custom bit packed data as plain python
bytes
.1:
[ffi.new("char[128]", bytes(f[0].tobytes())) for f in filters1]
I've started experimenting in
The text was updated successfully, but these errors were encountered: