roaringbitmap 0.7.2__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.2/roaringbitmap.egg-info → roaringbitmap-0.7.4}/PKG-INFO +88 -50
- {roaringbitmap-0.7.2 → roaringbitmap-0.7.4}/README.rst +74 -46
- roaringbitmap-0.7.4/pyproject.toml +22 -0
- {roaringbitmap-0.7.2 → roaringbitmap-0.7.4/roaringbitmap.egg-info}/PKG-INFO +88 -50
- {roaringbitmap-0.7.2 → roaringbitmap-0.7.4}/roaringbitmap.egg-info/SOURCES.txt +2 -0
- {roaringbitmap-0.7.2 → roaringbitmap-0.7.4}/setup.py +17 -6
- roaringbitmap-0.7.4/src/cpu_features.h +30 -0
- {roaringbitmap-0.7.2 → roaringbitmap-0.7.4}/src/roaringbitmap.c +71947 -52085
- {roaringbitmap-0.7.2 → roaringbitmap-0.7.4}/LICENSE +0 -0
- {roaringbitmap-0.7.2 → roaringbitmap-0.7.4}/MANIFEST.in +0 -0
- {roaringbitmap-0.7.2 → roaringbitmap-0.7.4}/roaringbitmap.egg-info/dependency_links.txt +0 -0
- {roaringbitmap-0.7.2 → roaringbitmap-0.7.4}/roaringbitmap.egg-info/top_level.txt +0 -0
- {roaringbitmap-0.7.2 → roaringbitmap-0.7.4}/setup.cfg +0 -0
- {roaringbitmap-0.7.2 → roaringbitmap-0.7.4}/src/_arrayops.h +0 -0
- {roaringbitmap-0.7.2 → roaringbitmap-0.7.4}/src/bitcount.h +0 -0
- {roaringbitmap-0.7.2 → roaringbitmap-0.7.4}/src/macros.h +0 -0
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
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
|
|
7
7
|
Author-email: A.W.van.Cranenburgh@rug.nl
|
|
8
|
-
License: GPL
|
|
8
|
+
License: GPL-2.0-or-later
|
|
9
9
|
Platform: Many
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: Intended Audience :: Science/Research
|
|
12
|
-
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
|
|
13
12
|
Classifier: Operating System :: POSIX
|
|
14
13
|
Classifier: Programming Language :: Python :: 2.7
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.3
|
|
16
15
|
Classifier: Programming Language :: Cython
|
|
16
|
+
Description-Content-Type: text/x-rst
|
|
17
17
|
License-File: LICENSE
|
|
18
|
+
Dynamic: author
|
|
19
|
+
Dynamic: author-email
|
|
20
|
+
Dynamic: classifier
|
|
21
|
+
Dynamic: description
|
|
22
|
+
Dynamic: description-content-type
|
|
23
|
+
Dynamic: home-page
|
|
24
|
+
Dynamic: license
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
Dynamic: platform
|
|
27
|
+
Dynamic: summary
|
|
18
28
|
|
|
19
29
|
Roaring Bitmap in Cython
|
|
20
30
|
========================
|
|
@@ -54,18 +64,37 @@ License, requirements
|
|
|
54
64
|
The code is licensed under GNU GPL v2, or any later version at your option.
|
|
55
65
|
|
|
56
66
|
- Python 2.7+/3.3+ http://www.python.org (headers required, e.g. python-dev package)
|
|
57
|
-
- Cython 0
|
|
67
|
+
- Cython 3.0+ http://www.cython.org
|
|
58
68
|
|
|
59
|
-
Installation
|
|
60
|
-
|
|
69
|
+
Installation
|
|
70
|
+
------------
|
|
61
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:
|
|
62
81
|
::
|
|
63
82
|
|
|
64
83
|
$ git clone https://github.com/andreasvc/roaringbitmap.git
|
|
65
84
|
$ cd roaringbitmap
|
|
66
85
|
$ make
|
|
67
86
|
|
|
68
|
-
|
|
87
|
+
For Python 2, build with a Cython version that supports Python 2.7::
|
|
88
|
+
|
|
89
|
+
$ python2 -m pip install 'Cython>=3,<3.1'
|
|
90
|
+
$ make py2
|
|
91
|
+
|
|
92
|
+
The C sources published on PyPI are generated with the current Cython release
|
|
93
|
+
and support Python 3 only.
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
Usage
|
|
97
|
+
-----
|
|
69
98
|
|
|
70
99
|
A ``RoaringBitmap()`` can be used as a replacement for a normal (mutable)
|
|
71
100
|
Python set containing (unsigned) 32-bit integers:
|
|
@@ -99,54 +128,63 @@ Output of ``$ make bench``::
|
|
|
99
128
|
|
|
100
129
|
small sparse set
|
|
101
130
|
100 runs with sets of 200 random elements n s.t. 0 <= n < 40000
|
|
102
|
-
|
|
103
|
-
init 0.
|
|
104
|
-
initsort
|
|
105
|
-
and
|
|
106
|
-
or
|
|
107
|
-
xor
|
|
108
|
-
sub 0.
|
|
109
|
-
iand 1.
|
|
110
|
-
ior
|
|
111
|
-
ixor 8.
|
|
112
|
-
isub 6.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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
|
|
116
148
|
|
|
117
149
|
medium load factor
|
|
118
150
|
100 runs with sets of 59392 random elements n s.t. 0 <= n < 118784
|
|
119
|
-
|
|
120
|
-
init 0.
|
|
121
|
-
initsort 0.
|
|
122
|
-
and 0.
|
|
123
|
-
or 0.
|
|
124
|
-
xor
|
|
125
|
-
sub 0.
|
|
126
|
-
iand 0.
|
|
127
|
-
ior 0.
|
|
128
|
-
ixor 0.
|
|
129
|
-
isub 0.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
|
133
168
|
|
|
134
169
|
dense set / high load factor
|
|
135
170
|
100 runs with sets of 39800 random elements n s.t. 0 <= n < 40000
|
|
136
|
-
|
|
137
|
-
init
|
|
138
|
-
initsort 0.
|
|
139
|
-
and
|
|
140
|
-
or
|
|
141
|
-
xor 0.
|
|
142
|
-
sub
|
|
143
|
-
iand 0.
|
|
144
|
-
ior
|
|
145
|
-
ixor 0.
|
|
146
|
-
isub
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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
|
|
150
188
|
|
|
151
189
|
See https://github.com/Ezibenroc/roaring_analysis/ for a performance comparison
|
|
152
190
|
of PyRoaringBitmap and this library.
|
|
@@ -36,18 +36,37 @@ License, requirements
|
|
|
36
36
|
The code is licensed under GNU GPL v2, or any later version at your option.
|
|
37
37
|
|
|
38
38
|
- Python 2.7+/3.3+ http://www.python.org (headers required, e.g. python-dev package)
|
|
39
|
-
- Cython 0
|
|
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
|
|
47
56
|
$ cd roaringbitmap
|
|
48
57
|
$ make
|
|
49
58
|
|
|
50
|
-
|
|
59
|
+
For Python 2, build with a Cython version that supports Python 2.7::
|
|
60
|
+
|
|
61
|
+
$ python2 -m pip install 'Cython>=3,<3.1'
|
|
62
|
+
$ make py2
|
|
63
|
+
|
|
64
|
+
The C sources published on PyPI are generated with the current Cython release
|
|
65
|
+
and support Python 3 only.
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
Usage
|
|
69
|
+
-----
|
|
51
70
|
|
|
52
71
|
A ``RoaringBitmap()`` can be used as a replacement for a normal (mutable)
|
|
53
72
|
Python set containing (unsigned) 32-bit integers:
|
|
@@ -81,54 +100,63 @@ Output of ``$ make bench``::
|
|
|
81
100
|
|
|
82
101
|
small sparse set
|
|
83
102
|
100 runs with sets of 200 random elements n s.t. 0 <= n < 40000
|
|
84
|
-
|
|
85
|
-
init 0.
|
|
86
|
-
initsort
|
|
87
|
-
and
|
|
88
|
-
or
|
|
89
|
-
xor
|
|
90
|
-
sub 0.
|
|
91
|
-
iand 1.
|
|
92
|
-
ior
|
|
93
|
-
ixor 8.
|
|
94
|
-
isub 6.
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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
|
|
98
120
|
|
|
99
121
|
medium load factor
|
|
100
122
|
100 runs with sets of 59392 random elements n s.t. 0 <= n < 118784
|
|
101
|
-
|
|
102
|
-
init 0.
|
|
103
|
-
initsort 0.
|
|
104
|
-
and 0.
|
|
105
|
-
or 0.
|
|
106
|
-
xor
|
|
107
|
-
sub 0.
|
|
108
|
-
iand 0.
|
|
109
|
-
ior 0.
|
|
110
|
-
ixor 0.
|
|
111
|
-
isub 0.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
|
115
140
|
|
|
116
141
|
dense set / high load factor
|
|
117
142
|
100 runs with sets of 39800 random elements n s.t. 0 <= n < 40000
|
|
118
|
-
|
|
119
|
-
init
|
|
120
|
-
initsort 0.
|
|
121
|
-
and
|
|
122
|
-
or
|
|
123
|
-
xor 0.
|
|
124
|
-
sub
|
|
125
|
-
iand 0.
|
|
126
|
-
ior
|
|
127
|
-
ixor 0.
|
|
128
|
-
isub
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
|
|
132
160
|
|
|
133
161
|
See https://github.com/Ezibenroc/roaring_analysis/ for a performance comparison
|
|
134
162
|
of PyRoaringBitmap and this library.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"setuptools<45; python_version < '3'",
|
|
4
|
+
"setuptools>=61; python_version >= '3'",
|
|
5
|
+
"Cython>=3,<3.1; python_version < '3'",
|
|
6
|
+
"Cython>=3; python_version >= '3'",
|
|
7
|
+
]
|
|
8
|
+
build-backend = "setuptools.build_meta"
|
|
9
|
+
|
|
10
|
+
[dependency-groups]
|
|
11
|
+
dev = [
|
|
12
|
+
"pytest>=3.0.0",
|
|
13
|
+
"pycodestyle",
|
|
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,20 +1,30 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
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
|
|
7
7
|
Author-email: A.W.van.Cranenburgh@rug.nl
|
|
8
|
-
License: GPL
|
|
8
|
+
License: GPL-2.0-or-later
|
|
9
9
|
Platform: Many
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: Intended Audience :: Science/Research
|
|
12
|
-
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
|
|
13
12
|
Classifier: Operating System :: POSIX
|
|
14
13
|
Classifier: Programming Language :: Python :: 2.7
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.3
|
|
16
15
|
Classifier: Programming Language :: Cython
|
|
16
|
+
Description-Content-Type: text/x-rst
|
|
17
17
|
License-File: LICENSE
|
|
18
|
+
Dynamic: author
|
|
19
|
+
Dynamic: author-email
|
|
20
|
+
Dynamic: classifier
|
|
21
|
+
Dynamic: description
|
|
22
|
+
Dynamic: description-content-type
|
|
23
|
+
Dynamic: home-page
|
|
24
|
+
Dynamic: license
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
Dynamic: platform
|
|
27
|
+
Dynamic: summary
|
|
18
28
|
|
|
19
29
|
Roaring Bitmap in Cython
|
|
20
30
|
========================
|
|
@@ -54,18 +64,37 @@ License, requirements
|
|
|
54
64
|
The code is licensed under GNU GPL v2, or any later version at your option.
|
|
55
65
|
|
|
56
66
|
- Python 2.7+/3.3+ http://www.python.org (headers required, e.g. python-dev package)
|
|
57
|
-
- Cython 0
|
|
67
|
+
- Cython 3.0+ http://www.cython.org
|
|
58
68
|
|
|
59
|
-
Installation
|
|
60
|
-
|
|
69
|
+
Installation
|
|
70
|
+
------------
|
|
61
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:
|
|
62
81
|
::
|
|
63
82
|
|
|
64
83
|
$ git clone https://github.com/andreasvc/roaringbitmap.git
|
|
65
84
|
$ cd roaringbitmap
|
|
66
85
|
$ make
|
|
67
86
|
|
|
68
|
-
|
|
87
|
+
For Python 2, build with a Cython version that supports Python 2.7::
|
|
88
|
+
|
|
89
|
+
$ python2 -m pip install 'Cython>=3,<3.1'
|
|
90
|
+
$ make py2
|
|
91
|
+
|
|
92
|
+
The C sources published on PyPI are generated with the current Cython release
|
|
93
|
+
and support Python 3 only.
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
Usage
|
|
97
|
+
-----
|
|
69
98
|
|
|
70
99
|
A ``RoaringBitmap()`` can be used as a replacement for a normal (mutable)
|
|
71
100
|
Python set containing (unsigned) 32-bit integers:
|
|
@@ -99,54 +128,63 @@ Output of ``$ make bench``::
|
|
|
99
128
|
|
|
100
129
|
small sparse set
|
|
101
130
|
100 runs with sets of 200 random elements n s.t. 0 <= n < 40000
|
|
102
|
-
|
|
103
|
-
init 0.
|
|
104
|
-
initsort
|
|
105
|
-
and
|
|
106
|
-
or
|
|
107
|
-
xor
|
|
108
|
-
sub 0.
|
|
109
|
-
iand 1.
|
|
110
|
-
ior
|
|
111
|
-
ixor 8.
|
|
112
|
-
isub 6.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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
|
|
116
148
|
|
|
117
149
|
medium load factor
|
|
118
150
|
100 runs with sets of 59392 random elements n s.t. 0 <= n < 118784
|
|
119
|
-
|
|
120
|
-
init 0.
|
|
121
|
-
initsort 0.
|
|
122
|
-
and 0.
|
|
123
|
-
or 0.
|
|
124
|
-
xor
|
|
125
|
-
sub 0.
|
|
126
|
-
iand 0.
|
|
127
|
-
ior 0.
|
|
128
|
-
ixor 0.
|
|
129
|
-
isub 0.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
|
133
168
|
|
|
134
169
|
dense set / high load factor
|
|
135
170
|
100 runs with sets of 39800 random elements n s.t. 0 <= n < 40000
|
|
136
|
-
|
|
137
|
-
init
|
|
138
|
-
initsort 0.
|
|
139
|
-
and
|
|
140
|
-
or
|
|
141
|
-
xor 0.
|
|
142
|
-
sub
|
|
143
|
-
iand 0.
|
|
144
|
-
ior
|
|
145
|
-
ixor 0.
|
|
146
|
-
isub
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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
|
|
150
188
|
|
|
151
189
|
See https://github.com/Ezibenroc/roaring_analysis/ for a performance comparison
|
|
152
190
|
of PyRoaringBitmap and this library.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
LICENSE
|
|
2
2
|
MANIFEST.in
|
|
3
3
|
README.rst
|
|
4
|
+
pyproject.toml
|
|
4
5
|
setup.py
|
|
5
6
|
roaringbitmap.egg-info/PKG-INFO
|
|
6
7
|
roaringbitmap.egg-info/SOURCES.txt
|
|
@@ -8,5 +9,6 @@ roaringbitmap.egg-info/dependency_links.txt
|
|
|
8
9
|
roaringbitmap.egg-info/top_level.txt
|
|
9
10
|
src/_arrayops.h
|
|
10
11
|
src/bitcount.h
|
|
12
|
+
src/cpu_features.h
|
|
11
13
|
src/macros.h
|
|
12
14
|
src/roaringbitmap.c
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""Generic setup.py for Cython code."""
|
|
2
2
|
import os
|
|
3
|
+
import platform
|
|
3
4
|
import sys
|
|
4
|
-
from
|
|
5
|
-
from distutils.extension import Extension
|
|
5
|
+
from setuptools import Extension, setup
|
|
6
6
|
|
|
7
7
|
PY2 = sys.version_info[0] == 2
|
|
8
8
|
|
|
@@ -29,22 +29,27 @@ MTUNE = '--with-mtune' in sys.argv
|
|
|
29
29
|
if MTUNE:
|
|
30
30
|
sys.argv.remove('--with-mtune')
|
|
31
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
|
+
|
|
32
37
|
with open('README.rst') as inp:
|
|
33
38
|
README = inp.read()
|
|
34
39
|
|
|
35
40
|
METADATA = dict(name='roaringbitmap',
|
|
36
|
-
version='0.7.
|
|
41
|
+
version='0.7.4',
|
|
37
42
|
description='Roaring Bitmap',
|
|
38
43
|
long_description=README,
|
|
44
|
+
long_description_content_type='text/x-rst',
|
|
39
45
|
author='Andreas van Cranenburgh',
|
|
40
46
|
author_email='A.W.van.Cranenburgh@rug.nl',
|
|
41
47
|
url='http://roaringbitmap.readthedocs.io',
|
|
42
|
-
license='GPL',
|
|
48
|
+
license='GPL-2.0-or-later',
|
|
43
49
|
platforms=['Many'],
|
|
44
50
|
classifiers=[
|
|
45
51
|
'Development Status :: 4 - Beta',
|
|
46
52
|
'Intended Audience :: Science/Research',
|
|
47
|
-
'License :: OSI Approved :: GNU General Public License (GPL)',
|
|
48
53
|
'Operating System :: POSIX',
|
|
49
54
|
'Programming Language :: Python :: 2.7',
|
|
50
55
|
'Programming Language :: Python :: 3.3',
|
|
@@ -86,7 +91,13 @@ if __name__ == '__main__':
|
|
|
86
91
|
extra_link_args = []
|
|
87
92
|
if not DEBUG and sys.platform != 'win32':
|
|
88
93
|
extra_compile_args += ['-O3', '-DNDEBUG']
|
|
89
|
-
|
|
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'])
|
|
90
101
|
extra_link_args += ['-DNDEBUG']
|
|
91
102
|
if USE_CYTHON:
|
|
92
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
|