Commit graph

693 commits

Author SHA1 Message Date
Richard Artoul
7a57b24b46 Fix comment 2018-12-07 16:11:16 -05:00
Richard Artoul
a2bb87771d Refactor 2018-12-07 16:11:16 -05:00
Richard Artoul
d96bde179d factor out summary stats calculation into helper 2018-12-07 16:11:16 -05:00
Richard Artoul
3d0d0db2e9 more micro-optimizations 2018-12-07 16:11:16 -05:00
Richard Artoul
76aea6d9bc rename structs 2018-12-07 16:11:16 -05:00
Richard Artoul
c1c1121e51 more comment refactoring 2018-12-07 16:11:16 -05:00
Richard Artoul
5ddeb0f6a0 refactor comment for clarity 2018-12-07 16:11:16 -05:00
Richard Artoul
d35aabfa86 remove double space 2018-12-07 16:11:16 -05:00
Richard Artoul
d6e2d07687 refactor comment for clarity 2018-12-07 16:11:16 -05:00
Richard Artoul
3193fc98ab refactor comment for clarity 2018-12-07 16:11:16 -05:00
Richard Artoul
3f3fec3824 refactor comment for clarity 2018-12-07 16:11:16 -05:00
Richard Artoul
efd6116d3f replace word in comment for clarity 2018-12-07 16:11:16 -05:00
Richard Artoul
038e3d4304 fix diagram 2018-12-07 16:11:16 -05:00
Richard Artoul
f97ff4b5a0 special case individual union 2018-12-07 16:11:16 -05:00
Richard Artoul
56b3d7d5db fix comment 2018-12-07 16:11:16 -05:00
Richard Artoul
feb19c62b9 Change repair functions to specify they are bitmap only 2018-12-07 16:11:16 -05:00
Richard Artoul
25eae0204d Update benchmarks 2018-12-07 16:11:16 -05:00
Richard Artoul
70338be7ca Add crazy comment 2018-12-07 16:11:16 -05:00
Richard Artoul
49df3fcd30 Dont shadow statshit 2018-12-07 16:11:16 -05:00
Richard Artoul
4cdf2adbe5 fix comment 2018-12-07 16:11:16 -05:00
Richard Artoul
06e7dbdc75 simplify and remove dead code 2018-12-07 16:11:16 -05:00
Richard Artoul
7931bc2c37 Add comment 2018-12-07 16:11:16 -05:00
Richard Artoul
defcb40f8c Add comment 2018-12-07 16:11:16 -05:00
Richard Artoul
c02479a5f9 more comments and cleanup 2018-12-07 16:11:16 -05:00
Richard Artoul
8e3da346c3 Add more comments and add helper method for bulk marking handled 2018-12-07 16:11:16 -05:00
Richard Artoul
5b50ecfd8e delete unused code 2018-12-07 16:11:16 -05:00
Richard Artoul
13dbe22b18 Move next logic into helper 2018-12-07 16:11:16 -05:00
Richard Artoul
fccc707006 remove debug code 2018-12-07 16:11:16 -05:00
Richard Artoul
d78e2fc87c Move repair logic to helpers 2018-12-07 16:11:16 -05:00
Richard Artoul
50f119df4e Allocate bitmap if needed (existing wrong type 2018-12-07 16:11:15 -05:00
Richard Artoul
3eb060c4c6 fix bug 2018-12-07 16:11:15 -05:00
Richard Artoul
eb5ad7bf49 dont keep n in sync with bitmaprun in place 2018-12-07 16:11:15 -05:00
Richard Artoul
b47292aa26 switch to bitmap repairs for inplace algo 2018-12-07 16:11:15 -05:00
Richard Artoul
339a78d88d wokring 2018-12-07 16:11:15 -05:00
Richard Artoul
e8e4369f76 all passing 2018-12-07 16:11:15 -05:00
Richard Artoul
30946a0372 working 2018-12-07 16:11:15 -05:00
Richard Artoul
af3cb91a40 first 2018-12-07 16:11:15 -05:00
Richard Artoul
2e1f60ac42 horrible wip 2018-12-07 16:11:15 -05:00
Richard Artoul
d2da91fdde add test 2018-12-07 16:11:15 -05:00
Richard Artoul
d3606e274d fix bug 2018-12-07 16:11:15 -05:00
Richard Artoul
b77c8a630b Add in place union 2018-12-07 16:11:15 -05:00
Todd Gruben
de1b9b4de2 yata gofmt 2018-11-26 15:21:37 -06:00
Todd Gruben
f6d34b42ba gofmt 2018-11-26 15:05:43 -06:00
Seebs
3f6c17f433 roaring: use DirectAdd rather than op.apply for cheap performance win
Calling op.apply on an op we know to be an add ends up noticably
increasing the cost of the operation; this trivial change gets about
a 5-10% reduction in reported runtime of benchmarks doing a lot
of adds. (The other IntersectionCount benchmarks don't actually use
Add most of the time, so it doesn't show up in them.)

name                                    old time/op  new time/op  delta
GetBenchData-8                          4.25ms ± 0%  3.91ms ± 2%   -8.04%  (p=0.002 n=6+6)
Bitmap_IntersectionCount_ArrayArray-8   20.9µs ± 2%  18.7µs ± 3%  -10.18%  (p=0.004 n=5+6)
SliceAscending-8                        24.7ms ± 0%  21.8ms ± 0%  -11.74%  (p=0.004 n=5+6)
SliceDescending-8                       29.8ms ± 0%  27.0ms ± 0%   -9.56%  (p=0.004 n=5+6)
SliceAscendingStriped-8                 32.0ms ± 0%  29.5ms ± 0%   -8.07%  (p=0.008 n=5+5)
SliceDescendingStriped-8                39.3ms ± 1%  36.8ms ± 1%   -6.27%  (p=0.002 n=6+6)
2018-11-26 14:12:02 -06:00
Seebs
67e3dc4a08 roaring: improve SliceAscending/SliceDescending tests
Two changes: First, make SliceDescending set the entire
slice, not all-but-one bits. Second, add tests that are
"striped", so it's writing to 8 parts of the slice
sequentially, rather than just going up or down the whole
thing, because that gives us some cheap indication of
cache-locality impact, which turns out to be possibly
significant.
2018-11-26 14:12:02 -06:00
Todd Gruben
0404354faa add shift operater to pql 2018-11-26 11:29:05 -06:00
Todd Gruben
933d5e28e7 initial bit shift functions for all container type 2018-11-20 15:12:02 -06:00
Seebs
e20671b2b4 silence gometalinter
I am aware that I don't actually ever use the length of a
after this line of code, but if I don't correctly update it,
any future change that needs that length will break
mysteriously. We humbly ask gometalinter to consider
the reply of counsel in _Arkell v. Pressdram_ (1971).
2018-11-16 15:00:09 -06:00
Seebs
7c82f48046 improve testing for intersections of array/array pairs
A transient bug introduced in intersectionCountArrayArray was
not caught by the tests, because it would only manifest when
two containers of different lengths were being compared. Also
improve the testing for intersectArrayArray, even though that
code hasn't been changed.
2018-11-16 15:00:09 -06:00
Seebs
1a8633f3a5 use roaring conventions for variable names
Roaring likes to call things "a" and "b", not "1" and "2",
and use "n" for length, not "l", etcetera. Adopt these
conventions to make code more readable.

Also drop the 'vb' value since it isn't expensive to
compute and the compiler can figure out that it can
reuse the value.
2018-11-16 15:00:09 -06:00