roaringbitmap 0.7.3__tar.gz → 0.7.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {roaringbitmap-0.7.3/roaringbitmap.egg-info → roaringbitmap-0.7.4}/PKG-INFO +67 -45
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4}/README.rst +66 -44
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4}/pyproject.toml +8 -0
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4/roaringbitmap.egg-info}/PKG-INFO +67 -45
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4}/roaringbitmap.egg-info/SOURCES.txt +1 -0
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4}/setup.py +14 -2
- roaringbitmap-0.7.4/src/cpu_features.h +30 -0
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4}/src/roaringbitmap.c +8211 -7576
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4}/LICENSE +0 -0
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4}/MANIFEST.in +0 -0
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4}/roaringbitmap.egg-info/dependency_links.txt +0 -0
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4}/roaringbitmap.egg-info/top_level.txt +0 -0
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4}/setup.cfg +0 -0
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4}/src/_arrayops.h +0 -0
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4}/src/bitcount.h +0 -0
- {roaringbitmap-0.7.3 → roaringbitmap-0.7.4}/src/macros.h +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: roaringbitmap
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.4
|
|
4
4
|
Summary: Roaring Bitmap
|
|
5
5
|
Home-page: http://roaringbitmap.readthedocs.io
|
|
6
6
|
Author: Andreas van Cranenburgh
|
|
@@ -66,9 +66,18 @@ The code is licensed under GNU GPL v2, or any later version at your option.
|
|
|
66
66
|
- Python 2.7+/3.3+ http://www.python.org (headers required, e.g. python-dev package)
|
|
67
67
|
- Cython 3.0+ http://www.cython.org
|
|
68
68
|
|
|
69
|
-
Installation
|
|
70
|
-
|
|
69
|
+
Installation
|
|
70
|
+
------------
|
|
71
71
|
|
|
72
|
+
::
|
|
73
|
+
$ pip install roaringbitmap
|
|
74
|
+
|
|
75
|
+
For Linux and Mac, there are binary wheels. Binary wheels for x86-64 require
|
|
76
|
+
the POPCNT CPU instruction and raise ``ImportError`` on unsupported CPUs.
|
|
77
|
+
Builds from source use ``-march=native`` by default and are optimized for the
|
|
78
|
+
build machine.
|
|
79
|
+
|
|
80
|
+
To compile from source:
|
|
72
81
|
::
|
|
73
82
|
|
|
74
83
|
$ git clone https://github.com/andreasvc/roaringbitmap.git
|
|
@@ -83,6 +92,10 @@ For Python 2, build with a Cython version that supports Python 2.7::
|
|
|
83
92
|
The C sources published on PyPI are generated with the current Cython release
|
|
84
93
|
and support Python 3 only.
|
|
85
94
|
|
|
95
|
+
|
|
96
|
+
Usage
|
|
97
|
+
-----
|
|
98
|
+
|
|
86
99
|
A ``RoaringBitmap()`` can be used as a replacement for a normal (mutable)
|
|
87
100
|
Python set containing (unsigned) 32-bit integers:
|
|
88
101
|
|
|
@@ -115,54 +128,63 @@ Output of ``$ make bench``::
|
|
|
115
128
|
|
|
116
129
|
small sparse set
|
|
117
130
|
100 runs with sets of 200 random elements n s.t. 0 <= n < 40000
|
|
118
|
-
|
|
119
|
-
init 0.
|
|
120
|
-
initsort
|
|
121
|
-
and
|
|
122
|
-
or
|
|
123
|
-
xor
|
|
124
|
-
sub 0.
|
|
125
|
-
iand 1.
|
|
126
|
-
ior
|
|
127
|
-
ixor 8.
|
|
128
|
-
isub 6.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
set() RoaringBitmap() ratio
|
|
132
|
+
init 0.000383 0.000627 0.61
|
|
133
|
+
initsort 0.000992 0.000258 3.85
|
|
134
|
+
and 0.000499 0.000125 3.98
|
|
135
|
+
or 0.000507 8.9e-05 5.7
|
|
136
|
+
xor 0.000479 8.14e-05 5.88
|
|
137
|
+
sub 0.000335 7.57e-05 4.42
|
|
138
|
+
iand 1.18e-05 2.77e-06 4.26
|
|
139
|
+
ior 8.39e-06 2.75e-06 3.05
|
|
140
|
+
ixor 8.12e-06 2.81e-06 2.89
|
|
141
|
+
isub 6.54e-06 2.87e-06 2.28
|
|
142
|
+
eq_identity 0.000183 4.78e-06 38.2
|
|
143
|
+
eq_equal 0.000169 7.33e-06 23
|
|
144
|
+
neq_card 4.62e-06 5.43e-06 0.85
|
|
145
|
+
neq_early 1.79e-05 6.21e-06 2.89
|
|
146
|
+
neq_late 0.000167 6.64e-06 25.2
|
|
147
|
+
jaccard 0.000973 4.99e-05 19.5
|
|
132
148
|
|
|
133
149
|
medium load factor
|
|
134
150
|
100 runs with sets of 59392 random elements n s.t. 0 <= n < 118784
|
|
135
|
-
|
|
136
|
-
init 0.
|
|
137
|
-
initsort 0.
|
|
138
|
-
and 0.
|
|
139
|
-
or 0.
|
|
140
|
-
xor
|
|
141
|
-
sub 0.
|
|
142
|
-
iand 0.
|
|
143
|
-
ior 0.
|
|
144
|
-
ixor 0.
|
|
145
|
-
isub 0.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
set() RoaringBitmap() ratio
|
|
152
|
+
init 0.451 0.138 3.26
|
|
153
|
+
initsort 0.349 0.0995 3.51
|
|
154
|
+
and 0.362 0.000271 1336
|
|
155
|
+
or 0.482 0.000248 1942
|
|
156
|
+
xor 0.46 0.000258 1780
|
|
157
|
+
sub 0.381 0.000444 857
|
|
158
|
+
iand 0.00421 5.33e-06 790
|
|
159
|
+
ior 0.00581 5.49e-06 1058
|
|
160
|
+
ixor 0.00243 5.05e-06 481
|
|
161
|
+
isub 0.00229 4.88e-06 469
|
|
162
|
+
eq_identity 0.123 1.64e-05 7501
|
|
163
|
+
eq_equal 0.137 3.75e-05 3643
|
|
164
|
+
neq_card 7.49e-06 7.06e-06 1.06
|
|
165
|
+
neq_early 8.08e-06 2.22e-05 0.364
|
|
166
|
+
neq_late 0.139 5.42e-05 2571
|
|
167
|
+
jaccard 0.88 0.000183 4806
|
|
149
168
|
|
|
150
169
|
dense set / high load factor
|
|
151
170
|
100 runs with sets of 39800 random elements n s.t. 0 <= n < 40000
|
|
152
|
-
|
|
153
|
-
init
|
|
154
|
-
initsort 0.
|
|
155
|
-
and
|
|
156
|
-
or
|
|
157
|
-
xor 0.
|
|
158
|
-
sub
|
|
159
|
-
iand 0.
|
|
160
|
-
ior
|
|
161
|
-
ixor 0.
|
|
162
|
-
isub
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
171
|
+
set() RoaringBitmap() ratio
|
|
172
|
+
init 0.206 0.0967 2.13
|
|
173
|
+
initsort 0.179 0.0531 3.37
|
|
174
|
+
and 0.149 0.000134 1117
|
|
175
|
+
or 0.209 0.000112 1862
|
|
176
|
+
xor 0.186 0.000112 1653
|
|
177
|
+
sub 0.12 0.000109 1092
|
|
178
|
+
iand 0.00174 3.75e-06 463
|
|
179
|
+
ior 0.000865 3.58e-06 241
|
|
180
|
+
ixor 0.00112 3.6e-06 310
|
|
181
|
+
isub 0.00102 3.5e-06 292
|
|
182
|
+
eq_identity 0.052 5.39e-06 9644
|
|
183
|
+
eq_equal 0.0559 1.68e-05 3318
|
|
184
|
+
neq_card 7.18e-06 7.53e-06 0.954
|
|
185
|
+
neq_early 7.17e-06 7.73e-06 0.928
|
|
186
|
+
neq_late 0.0437 1.36e-05 3209
|
|
187
|
+
jaccard 0.342 9.84e-05 3472
|
|
166
188
|
|
|
167
189
|
See https://github.com/Ezibenroc/roaring_analysis/ for a performance comparison
|
|
168
190
|
of PyRoaringBitmap and this library.
|
|
@@ -38,9 +38,18 @@ The code is licensed under GNU GPL v2, or any later version at your option.
|
|
|
38
38
|
- Python 2.7+/3.3+ http://www.python.org (headers required, e.g. python-dev package)
|
|
39
39
|
- Cython 3.0+ http://www.cython.org
|
|
40
40
|
|
|
41
|
-
Installation
|
|
42
|
-
|
|
41
|
+
Installation
|
|
42
|
+
------------
|
|
43
43
|
|
|
44
|
+
::
|
|
45
|
+
$ pip install roaringbitmap
|
|
46
|
+
|
|
47
|
+
For Linux and Mac, there are binary wheels. Binary wheels for x86-64 require
|
|
48
|
+
the POPCNT CPU instruction and raise ``ImportError`` on unsupported CPUs.
|
|
49
|
+
Builds from source use ``-march=native`` by default and are optimized for the
|
|
50
|
+
build machine.
|
|
51
|
+
|
|
52
|
+
To compile from source:
|
|
44
53
|
::
|
|
45
54
|
|
|
46
55
|
$ git clone https://github.com/andreasvc/roaringbitmap.git
|
|
@@ -55,6 +64,10 @@ For Python 2, build with a Cython version that supports Python 2.7::
|
|
|
55
64
|
The C sources published on PyPI are generated with the current Cython release
|
|
56
65
|
and support Python 3 only.
|
|
57
66
|
|
|
67
|
+
|
|
68
|
+
Usage
|
|
69
|
+
-----
|
|
70
|
+
|
|
58
71
|
A ``RoaringBitmap()`` can be used as a replacement for a normal (mutable)
|
|
59
72
|
Python set containing (unsigned) 32-bit integers:
|
|
60
73
|
|
|
@@ -87,54 +100,63 @@ Output of ``$ make bench``::
|
|
|
87
100
|
|
|
88
101
|
small sparse set
|
|
89
102
|
100 runs with sets of 200 random elements n s.t. 0 <= n < 40000
|
|
90
|
-
|
|
91
|
-
init 0.
|
|
92
|
-
initsort
|
|
93
|
-
and
|
|
94
|
-
or
|
|
95
|
-
xor
|
|
96
|
-
sub 0.
|
|
97
|
-
iand 1.
|
|
98
|
-
ior
|
|
99
|
-
ixor 8.
|
|
100
|
-
isub 6.
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
set() RoaringBitmap() ratio
|
|
104
|
+
init 0.000383 0.000627 0.61
|
|
105
|
+
initsort 0.000992 0.000258 3.85
|
|
106
|
+
and 0.000499 0.000125 3.98
|
|
107
|
+
or 0.000507 8.9e-05 5.7
|
|
108
|
+
xor 0.000479 8.14e-05 5.88
|
|
109
|
+
sub 0.000335 7.57e-05 4.42
|
|
110
|
+
iand 1.18e-05 2.77e-06 4.26
|
|
111
|
+
ior 8.39e-06 2.75e-06 3.05
|
|
112
|
+
ixor 8.12e-06 2.81e-06 2.89
|
|
113
|
+
isub 6.54e-06 2.87e-06 2.28
|
|
114
|
+
eq_identity 0.000183 4.78e-06 38.2
|
|
115
|
+
eq_equal 0.000169 7.33e-06 23
|
|
116
|
+
neq_card 4.62e-06 5.43e-06 0.85
|
|
117
|
+
neq_early 1.79e-05 6.21e-06 2.89
|
|
118
|
+
neq_late 0.000167 6.64e-06 25.2
|
|
119
|
+
jaccard 0.000973 4.99e-05 19.5
|
|
104
120
|
|
|
105
121
|
medium load factor
|
|
106
122
|
100 runs with sets of 59392 random elements n s.t. 0 <= n < 118784
|
|
107
|
-
|
|
108
|
-
init 0.
|
|
109
|
-
initsort 0.
|
|
110
|
-
and 0.
|
|
111
|
-
or 0.
|
|
112
|
-
xor
|
|
113
|
-
sub 0.
|
|
114
|
-
iand 0.
|
|
115
|
-
ior 0.
|
|
116
|
-
ixor 0.
|
|
117
|
-
isub 0.
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
123
|
+
set() RoaringBitmap() ratio
|
|
124
|
+
init 0.451 0.138 3.26
|
|
125
|
+
initsort 0.349 0.0995 3.51
|
|
126
|
+
and 0.362 0.000271 1336
|
|
127
|
+
or 0.482 0.000248 1942
|
|
128
|
+
xor 0.46 0.000258 1780
|
|
129
|
+
sub 0.381 0.000444 857
|
|
130
|
+
iand 0.00421 5.33e-06 790
|
|
131
|
+
ior 0.00581 5.49e-06 1058
|
|
132
|
+
ixor 0.00243 5.05e-06 481
|
|
133
|
+
isub 0.00229 4.88e-06 469
|
|
134
|
+
eq_identity 0.123 1.64e-05 7501
|
|
135
|
+
eq_equal 0.137 3.75e-05 3643
|
|
136
|
+
neq_card 7.49e-06 7.06e-06 1.06
|
|
137
|
+
neq_early 8.08e-06 2.22e-05 0.364
|
|
138
|
+
neq_late 0.139 5.42e-05 2571
|
|
139
|
+
jaccard 0.88 0.000183 4806
|
|
121
140
|
|
|
122
141
|
dense set / high load factor
|
|
123
142
|
100 runs with sets of 39800 random elements n s.t. 0 <= n < 40000
|
|
124
|
-
|
|
125
|
-
init
|
|
126
|
-
initsort 0.
|
|
127
|
-
and
|
|
128
|
-
or
|
|
129
|
-
xor 0.
|
|
130
|
-
sub
|
|
131
|
-
iand 0.
|
|
132
|
-
ior
|
|
133
|
-
ixor 0.
|
|
134
|
-
isub
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
143
|
+
set() RoaringBitmap() ratio
|
|
144
|
+
init 0.206 0.0967 2.13
|
|
145
|
+
initsort 0.179 0.0531 3.37
|
|
146
|
+
and 0.149 0.000134 1117
|
|
147
|
+
or 0.209 0.000112 1862
|
|
148
|
+
xor 0.186 0.000112 1653
|
|
149
|
+
sub 0.12 0.000109 1092
|
|
150
|
+
iand 0.00174 3.75e-06 463
|
|
151
|
+
ior 0.000865 3.58e-06 241
|
|
152
|
+
ixor 0.00112 3.6e-06 310
|
|
153
|
+
isub 0.00102 3.5e-06 292
|
|
154
|
+
eq_identity 0.052 5.39e-06 9644
|
|
155
|
+
eq_equal 0.0559 1.68e-05 3318
|
|
156
|
+
neq_card 7.18e-06 7.53e-06 0.954
|
|
157
|
+
neq_early 7.17e-06 7.73e-06 0.928
|
|
158
|
+
neq_late 0.0437 1.36e-05 3209
|
|
159
|
+
jaccard 0.342 9.84e-05 3472
|
|
138
160
|
|
|
139
161
|
See https://github.com/Ezibenroc/roaring_analysis/ for a performance comparison
|
|
140
162
|
of PyRoaringBitmap and this library.
|
|
@@ -12,3 +12,11 @@ dev = [
|
|
|
12
12
|
"pytest>=3.0.0",
|
|
13
13
|
"pycodestyle",
|
|
14
14
|
]
|
|
15
|
+
|
|
16
|
+
[tool.cibuildwheel]
|
|
17
|
+
build = "cp311-* cp312-* cp313-* cp314-* cp315-*"
|
|
18
|
+
skip = "*-musllinux_*"
|
|
19
|
+
build-verbosity = 1
|
|
20
|
+
environment = { ROARINGBITMAP_BUILD_WHEEL = "1" }
|
|
21
|
+
test-requires = "pytest"
|
|
22
|
+
test-command = "python -m pytest {project}/tests/unittests.py"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: roaringbitmap
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.4
|
|
4
4
|
Summary: Roaring Bitmap
|
|
5
5
|
Home-page: http://roaringbitmap.readthedocs.io
|
|
6
6
|
Author: Andreas van Cranenburgh
|
|
@@ -66,9 +66,18 @@ The code is licensed under GNU GPL v2, or any later version at your option.
|
|
|
66
66
|
- Python 2.7+/3.3+ http://www.python.org (headers required, e.g. python-dev package)
|
|
67
67
|
- Cython 3.0+ http://www.cython.org
|
|
68
68
|
|
|
69
|
-
Installation
|
|
70
|
-
|
|
69
|
+
Installation
|
|
70
|
+
------------
|
|
71
71
|
|
|
72
|
+
::
|
|
73
|
+
$ pip install roaringbitmap
|
|
74
|
+
|
|
75
|
+
For Linux and Mac, there are binary wheels. Binary wheels for x86-64 require
|
|
76
|
+
the POPCNT CPU instruction and raise ``ImportError`` on unsupported CPUs.
|
|
77
|
+
Builds from source use ``-march=native`` by default and are optimized for the
|
|
78
|
+
build machine.
|
|
79
|
+
|
|
80
|
+
To compile from source:
|
|
72
81
|
::
|
|
73
82
|
|
|
74
83
|
$ git clone https://github.com/andreasvc/roaringbitmap.git
|
|
@@ -83,6 +92,10 @@ For Python 2, build with a Cython version that supports Python 2.7::
|
|
|
83
92
|
The C sources published on PyPI are generated with the current Cython release
|
|
84
93
|
and support Python 3 only.
|
|
85
94
|
|
|
95
|
+
|
|
96
|
+
Usage
|
|
97
|
+
-----
|
|
98
|
+
|
|
86
99
|
A ``RoaringBitmap()`` can be used as a replacement for a normal (mutable)
|
|
87
100
|
Python set containing (unsigned) 32-bit integers:
|
|
88
101
|
|
|
@@ -115,54 +128,63 @@ Output of ``$ make bench``::
|
|
|
115
128
|
|
|
116
129
|
small sparse set
|
|
117
130
|
100 runs with sets of 200 random elements n s.t. 0 <= n < 40000
|
|
118
|
-
|
|
119
|
-
init 0.
|
|
120
|
-
initsort
|
|
121
|
-
and
|
|
122
|
-
or
|
|
123
|
-
xor
|
|
124
|
-
sub 0.
|
|
125
|
-
iand 1.
|
|
126
|
-
ior
|
|
127
|
-
ixor 8.
|
|
128
|
-
isub 6.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
set() RoaringBitmap() ratio
|
|
132
|
+
init 0.000383 0.000627 0.61
|
|
133
|
+
initsort 0.000992 0.000258 3.85
|
|
134
|
+
and 0.000499 0.000125 3.98
|
|
135
|
+
or 0.000507 8.9e-05 5.7
|
|
136
|
+
xor 0.000479 8.14e-05 5.88
|
|
137
|
+
sub 0.000335 7.57e-05 4.42
|
|
138
|
+
iand 1.18e-05 2.77e-06 4.26
|
|
139
|
+
ior 8.39e-06 2.75e-06 3.05
|
|
140
|
+
ixor 8.12e-06 2.81e-06 2.89
|
|
141
|
+
isub 6.54e-06 2.87e-06 2.28
|
|
142
|
+
eq_identity 0.000183 4.78e-06 38.2
|
|
143
|
+
eq_equal 0.000169 7.33e-06 23
|
|
144
|
+
neq_card 4.62e-06 5.43e-06 0.85
|
|
145
|
+
neq_early 1.79e-05 6.21e-06 2.89
|
|
146
|
+
neq_late 0.000167 6.64e-06 25.2
|
|
147
|
+
jaccard 0.000973 4.99e-05 19.5
|
|
132
148
|
|
|
133
149
|
medium load factor
|
|
134
150
|
100 runs with sets of 59392 random elements n s.t. 0 <= n < 118784
|
|
135
|
-
|
|
136
|
-
init 0.
|
|
137
|
-
initsort 0.
|
|
138
|
-
and 0.
|
|
139
|
-
or 0.
|
|
140
|
-
xor
|
|
141
|
-
sub 0.
|
|
142
|
-
iand 0.
|
|
143
|
-
ior 0.
|
|
144
|
-
ixor 0.
|
|
145
|
-
isub 0.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
151
|
+
set() RoaringBitmap() ratio
|
|
152
|
+
init 0.451 0.138 3.26
|
|
153
|
+
initsort 0.349 0.0995 3.51
|
|
154
|
+
and 0.362 0.000271 1336
|
|
155
|
+
or 0.482 0.000248 1942
|
|
156
|
+
xor 0.46 0.000258 1780
|
|
157
|
+
sub 0.381 0.000444 857
|
|
158
|
+
iand 0.00421 5.33e-06 790
|
|
159
|
+
ior 0.00581 5.49e-06 1058
|
|
160
|
+
ixor 0.00243 5.05e-06 481
|
|
161
|
+
isub 0.00229 4.88e-06 469
|
|
162
|
+
eq_identity 0.123 1.64e-05 7501
|
|
163
|
+
eq_equal 0.137 3.75e-05 3643
|
|
164
|
+
neq_card 7.49e-06 7.06e-06 1.06
|
|
165
|
+
neq_early 8.08e-06 2.22e-05 0.364
|
|
166
|
+
neq_late 0.139 5.42e-05 2571
|
|
167
|
+
jaccard 0.88 0.000183 4806
|
|
149
168
|
|
|
150
169
|
dense set / high load factor
|
|
151
170
|
100 runs with sets of 39800 random elements n s.t. 0 <= n < 40000
|
|
152
|
-
|
|
153
|
-
init
|
|
154
|
-
initsort 0.
|
|
155
|
-
and
|
|
156
|
-
or
|
|
157
|
-
xor 0.
|
|
158
|
-
sub
|
|
159
|
-
iand 0.
|
|
160
|
-
ior
|
|
161
|
-
ixor 0.
|
|
162
|
-
isub
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
171
|
+
set() RoaringBitmap() ratio
|
|
172
|
+
init 0.206 0.0967 2.13
|
|
173
|
+
initsort 0.179 0.0531 3.37
|
|
174
|
+
and 0.149 0.000134 1117
|
|
175
|
+
or 0.209 0.000112 1862
|
|
176
|
+
xor 0.186 0.000112 1653
|
|
177
|
+
sub 0.12 0.000109 1092
|
|
178
|
+
iand 0.00174 3.75e-06 463
|
|
179
|
+
ior 0.000865 3.58e-06 241
|
|
180
|
+
ixor 0.00112 3.6e-06 310
|
|
181
|
+
isub 0.00102 3.5e-06 292
|
|
182
|
+
eq_identity 0.052 5.39e-06 9644
|
|
183
|
+
eq_equal 0.0559 1.68e-05 3318
|
|
184
|
+
neq_card 7.18e-06 7.53e-06 0.954
|
|
185
|
+
neq_early 7.17e-06 7.73e-06 0.928
|
|
186
|
+
neq_late 0.0437 1.36e-05 3209
|
|
187
|
+
jaccard 0.342 9.84e-05 3472
|
|
166
188
|
|
|
167
189
|
See https://github.com/Ezibenroc/roaring_analysis/ for a performance comparison
|
|
168
190
|
of PyRoaringBitmap and this library.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""Generic setup.py for Cython code."""
|
|
2
2
|
import os
|
|
3
|
+
import platform
|
|
3
4
|
import sys
|
|
4
5
|
from setuptools import Extension, setup
|
|
5
6
|
|
|
@@ -28,11 +29,16 @@ MTUNE = '--with-mtune' in sys.argv
|
|
|
28
29
|
if MTUNE:
|
|
29
30
|
sys.argv.remove('--with-mtune')
|
|
30
31
|
|
|
32
|
+
# Release wheels must not inherit all instruction sets from the CI host. The
|
|
33
|
+
# x86-64 wheels deliberately require POPCNT, which provides most of the
|
|
34
|
+
# performance benefit of -march=native while remaining a predictable target.
|
|
35
|
+
WHEEL_BUILD = os.environ.get('ROARINGBITMAP_BUILD_WHEEL') == '1'
|
|
36
|
+
|
|
31
37
|
with open('README.rst') as inp:
|
|
32
38
|
README = inp.read()
|
|
33
39
|
|
|
34
40
|
METADATA = dict(name='roaringbitmap',
|
|
35
|
-
version='0.7.
|
|
41
|
+
version='0.7.4',
|
|
36
42
|
description='Roaring Bitmap',
|
|
37
43
|
long_description=README,
|
|
38
44
|
long_description_content_type='text/x-rst',
|
|
@@ -85,7 +91,13 @@ if __name__ == '__main__':
|
|
|
85
91
|
extra_link_args = []
|
|
86
92
|
if not DEBUG and sys.platform != 'win32':
|
|
87
93
|
extra_compile_args += ['-O3', '-DNDEBUG']
|
|
88
|
-
|
|
94
|
+
if WHEEL_BUILD:
|
|
95
|
+
if platform.machine().lower() in ('amd64', 'x86_64'):
|
|
96
|
+
extra_compile_args += [
|
|
97
|
+
'-DROARINGBITMAP_REQUIRE_POPCNT=1', '-mpopcnt']
|
|
98
|
+
else:
|
|
99
|
+
extra_compile_args += (
|
|
100
|
+
['-mtune=native'] if MTUNE else ['-march=native'])
|
|
89
101
|
extra_link_args += ['-DNDEBUG']
|
|
90
102
|
if USE_CYTHON:
|
|
91
103
|
if DEBUG:
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#ifndef ROARINGBITMAP_CPU_FEATURES_H_
|
|
2
|
+
#define ROARINGBITMAP_CPU_FEATURES_H_
|
|
3
|
+
|
|
4
|
+
#if defined(ROARINGBITMAP_REQUIRE_POPCNT) && defined(_MSC_VER)
|
|
5
|
+
#include <intrin.h>
|
|
6
|
+
#endif
|
|
7
|
+
|
|
8
|
+
/* Release wheels define this when they are compiled with -mpopcnt. Source
|
|
9
|
+
* builds and non-x86 wheels do not require features beyond their target's
|
|
10
|
+
* normal architecture baseline. */
|
|
11
|
+
static int roaring_cpu_supports_required_features(void) {
|
|
12
|
+
#if defined(ROARINGBITMAP_REQUIRE_POPCNT)
|
|
13
|
+
#if !(defined(__i386__) || defined(__x86_64__) || \
|
|
14
|
+
defined(_M_IX86) || defined(_M_X64))
|
|
15
|
+
return 0;
|
|
16
|
+
#elif defined(__GNUC__) || defined(__clang__)
|
|
17
|
+
return __builtin_cpu_supports("popcnt") != 0;
|
|
18
|
+
#elif defined(_MSC_VER)
|
|
19
|
+
int registers[4];
|
|
20
|
+
__cpuid(registers, 1);
|
|
21
|
+
return (registers[2] & (1 << 23)) != 0;
|
|
22
|
+
#else
|
|
23
|
+
return 0;
|
|
24
|
+
#endif
|
|
25
|
+
#else
|
|
26
|
+
return 1;
|
|
27
|
+
#endif
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
#endif
|