Commit graph

286 commits

Author SHA1 Message Date
Todd Gruben
621e22d26c simplified bitmap max function 2018-05-25 14:24:46 -05:00
Matt Jaffee
61fcf99f3e
unexport bitmapsEqual 2018-05-15 15:53:26 -05:00
Matt Jaffee
00a39aa338
implement Container.equals and get rid of reflect 2018-05-15 15:18:44 -05:00
Cody Soyland
b1eb137a20 Add missing license headers. 2018-05-15 12:26:33 -05:00
Cody Soyland
5103bfd8ce Remove errant "z". 2018-05-15 11:34:47 -05:00
Cody Soyland
cfb9146515 Use NewFileBitmap to get container implementation for testing ContainersIterator. 2018-05-15 11:30:37 -05:00
Cody Soyland
e8fcb0f055 Use NewFileBitmap for tests to test btree/slice containers separately. 2018-05-15 11:22:19 -05:00
Cody Soyland
89f3c10d2c Clarify comment 2018-05-15 10:25:53 -05:00
Cody Soyland
71373945da Rename Contiterator -> ContainerIterator 2018-05-15 10:22:02 -05:00
Cody Soyland
513c7fd705 B+tree integration work.
Export necessary vars from roaring to fix b+tree containers implementation.
Clean up naming.
Use constructor replacement for enterprise integration.
2018-05-14 17:32:30 -05:00
Cody Soyland
4282e90fe1 Export a few things to enable enterprise/b/containers_btree.go to work 2018-05-14 14:03:46 -05:00
Cody Soyland
faa79a385c Add B+tree to enterprise subpackage 2018-05-11 20:20:24 -05:00
Cody Soyland
4014f22802 Rename (export) container -> Container 2018-05-11 10:57:06 -05:00
Cody Soyland
2590b25628 Merge branch 'master' into vendor-btree 2018-05-10 11:28:13 -05:00
Travis Turner
23f5c7166b
cleat up flipBitmap and add tests 2018-04-23 13:23:35 -05:00
tgruben
4ffd28ca1b
Merge pull request #1167 from TocarIP/count
roaring: speed-up intersectionCountArrayBitmap
2018-03-22 15:01:45 -05:00
Ilias Dimos
13e3b04443 Fix misspells in comments 2018-03-09 14:12:15 +02:00
Matthew Jaffee
d04530a5c0
make container struct description more accurate 2018-03-03 11:45:48 -06:00
Ilya Tocar
2c8d9a5ae0 roaring: speed-up intersectionCountArrayBitmap
While looking at benchmarks as a possible go compiler benchmarks.
I've tried some optimizations by hand:
Move len(b.bitmap) load out of the loop.
Remove some type conversions.
Use (x >> off) & 1  to get offs bit, instead of  x & (1 << of)f >> off.

This produces nice speed-up and passes go test roaring.

name                                    old time/op  new time/op  delta
Bitmap_IntersectionCount_ArrayRun-6     2.06µs ± 0%  1.57µs ± 0%  -24.04%  (p=0.000 n=10+9)
Bitmap_IntersectionCount_BitmapRun-6    2.24µs ± 0%  2.24µs ± 0%     ~     (p=0.913 n=10+9)
Bitmap_IntersectionCount_ArrayBitmap-6  2.06µs ± 0%  1.56µs ± 1%  -24.05%  (p=0.000 n=9+10)
2018-02-28 17:08:26 -06:00
Todd Gruben
2d458b98a1 merge conflicts 2018-02-20 10:41:02 -06:00
Travis Turner
685a0075ae
add evenBits/oddBits container tests and related bug fix 2018-02-15 10:20:54 -06:00
Travis Turner
911af238ff
clean up roaring container helper functions 2018-02-14 15:06:53 -06:00
Travis Turner
673232baf9
bug fixes found by running container operation tests 2018-02-14 13:30:38 -06:00
Travis Turner
6529866b57
templates for testing various container operations 2018-02-14 13:30:07 -06:00
Travis Turner
944a0b5b3d
fixes a shift logic bug in bitmapZeroRange that was causing an overflow-like condition 2018-02-12 15:23:00 -06:00
Travis Turner
ac4010bce0
avoid overflow bug in differenceRunArray which was appending a full run to the container 2018-02-09 11:35:13 -06:00
Travis Turner
34c3497e20
rebase and fix tests 2018-02-07 14:00:13 -06:00
Travis Turner
b301399dcd
remove skiplist container implementation 2018-02-07 13:56:59 -06:00
Matt Jaffee
26b6f6b119
rename NewBitmap to NewSliceBitmap 2018-02-07 13:56:58 -06:00
Cody Soyland
65dadd2b35
Copy verbatim vendored legal notice and modify binary distribution process to include legal notices 2018-02-07 13:56:58 -06:00
Travis Turner
be8b794060
add NOTICE for third-party software licenses; in this case: btree 2018-02-07 13:56:58 -06:00
Travis Turner
6c0acf4dd3
squash with vendor btree commit 2018-02-07 13:56:58 -06:00
Todd Gruben
23970b98dc
changed roaring.NewBitmapBTree to roaring.NewBTreeBitmap 2018-02-07 13:56:58 -06:00
Todd Gruben
440980384c
applied travis suggestions 2018-02-07 13:56:58 -06:00
Todd Gruben
36f59a0326
slice containers 2018-02-07 13:56:58 -06:00
Todd Gruben
8a70c4e5a3
added slice containers type for in memory bitmaps and btree for file based 2018-02-07 13:56:58 -06:00
Todd Gruben
a159c74498
corrected return value in updater to prevent allocation 2018-02-07 13:56:57 -06:00
Todd Gruben
f5d5cbb0b9
limited scope of closure in btree PutContainerValues 2018-02-07 13:56:57 -06:00
Todd Gruben
f825bc3b80
merge 2018-02-07 13:56:57 -06:00
Travis Turner
0757a84f69
add PutContainerValues to Containers interface to prevent re-allocation of containers 2018-02-07 13:56:57 -06:00
Travis Turner
0bed8de647
vendor btree in roaring package to test non-interface on key/value 2018-02-07 13:56:57 -06:00
Travis Turner
e0fc49b512
reset lastContainer cache on Put to a mapped container. check lastContainer cache on Get 2018-02-07 13:56:57 -06:00
Travis Turner
ce052c133c
b+tree for Containers interface 2018-02-07 13:56:57 -06:00
Matthew Jaffee
fab493c42b
fix up missed conflict 2018-02-07 13:56:57 -06:00
Matthew Jaffee
5314d61086
Revert "remove interface"
This reverts commit 343e810bc65562d10d9408c941e65414c6945d9f.
2018-02-07 13:56:57 -06:00
Matthew Jaffee
be4696ebb9
remove interface 2018-02-07 13:56:56 -06:00
Matthew Jaffee
d798963798
fix a bunch of bugs and add some tests 2018-02-07 13:56:56 -06:00
Matthew Jaffee
bc6fb2627f
add initial skip list Containers impl 2018-02-07 13:56:56 -06:00
Matthew Jaffee
cce3379abf
add Containers interface and modify Bitmap to use it
there are no implementations of Containers, so everything is broken, but the
code compiles
2018-02-07 13:56:56 -06:00
Matthew Jaffee
cc8733eedb
fix bug where a count query and bitmap query could return different numbers
There was a case where the Bitmap iterator logic could skip over a bit in a run
container if 1. the run container was not the first container in the bitmap, and
2. The first run in the run container had only one bit.

The bug was due to how the iterator was initialized with iterator.Seek(0) which
sets up the initial values of itr.i,j,k based on the type of the first
container. It was failing to set itr.k to -1 unless the first container was an
RLE container. itr.k is only used by RLE containers in the iterator, and must be
set to -1 when an RLE container is encountered. When Iterator.Next() encountered
the run container and itr.k was set to 0, it checked to see if itr.k <= run.last
- run.first, and if so it assumes that it was finished with the run and moved to
the next one. run.last - run.first is 0 in the case of a single bit run, so that
bit was skipped. After this, itr.k is set to -1 and all further iteration
proceeds as expected.
2018-02-06 10:26:17 -06:00