Comments (2)
You wouldn't use a .h file, but a .pxd file. See http://docs.cython.org/en/latest/src/userguide/sharing_declarations.html
A RoaringBitmap
object is a Python object, implemented with a cdef class
, and until now I only exposed it with a Python API. Therefore, any operation you do with it has to go through Python, and there is (as far as I understand) almost nothing to be gained from static typing and cimport
ing RoaringBitmap
from Cython headers in a .pxd
file. In particular, as I recall, even cdef
functions of a cdef class
still go through the Python API, because they are part of a Python object, so for a Cython API to make sense, one would need to avoid using the cdef class
.
What would need to happen for this to make sense is that it should be decided which functions will be exposed as a public Cython API, and these cdef
functions and struct
s should then be listed in a .pxd
file. However, I'm not sure whether it is worth the effort. In general, it's always good to profile to identify bottlenecks before investing time in a potentially complicated change like this.
from roaringbitmap.
Agreed, .pyx
file, not .h
, I got confused
Now, from what I understand, the way to do it would be to define a _RoaringBitmap
cdef struct, which would be an attribute inside the RoaringBitmap cdef class
(just like you do for Block
), and then expose cdef functions
taking pointers on this struct as arguments.
Anyway I understand this seems complicated and gives no guarantee over potential speedups.
Thank you
from roaringbitmap.
Related Issues (20)
- arrays with elements <4 bytes cause MultiRoaringBitmap.jaccard_dist() seg fault HOT 3
- Feature request: multi-threaded MultiRoaringBitmap e.g., jaccard_dist() HOT 4
- Strange .clamp() behaviour with some ranges HOT 1
- Intersection of 2 large sets causing aborts HOT 4
- pickle/unpickle bug HOT 2
- Bug slicing a RB into ranges HOT 1
- Compute intersection for pairs within a MultiRoaringBitmap HOT 2
- Strange behavior using git version of roaring bitmap HOT 4
- Bug in __getitem__ with slices
- xor, difference are incorrect on large bitmaps HOT 3
- Bug in difference_update HOT 1
- Bug in intersection_update
- Run length encoding HOT 3
- some specific values can reliably segfault clamp() HOT 4
- MultiRoaringBitmap slicing return type HOT 4
- len(bitmap) != bitmap.numelem() HOT 1
- `MultiRoaringBitmap.jaccard_dist` against a query coming from an external `RoaringBitmap` HOT 2
- Apple M1 does not support -march=native HOT 8
- Segfault on in-place difference
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roaringbitmap.