-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/bp128 pack #1308
Feature/bp128 pack #1308
Conversation
783e1aa
to
c54f1a0
Compare
c54f1a0
to
daf2800
Compare
daf2800
to
4691012
Compare
Reviewed 5 of 19 files at r1, 11 of 20 files at r2, 7 of 7 files at r3. algo/uidlist.go, line 48 at r3 (raw file):
should be lower of n or m. Even then, we can just avoid allocating so much memory upfront. and let Go take care of it. So, don't preallocate, basically. algo/uidlist.go, line 54 at r3 (raw file):
n is always the smaller one. Also, if m == 0 -> m = 1. Then calculate ratio. algo/uidlist.go, line 80 at r3 (raw file):
Reuse the other code. algo/uidlist.go, line 103 at r3 (raw file):
Use the index at the front. In fact, don't need two different approaches: lin and jump. algo/uidlist.go, line 225 at r3 (raw file):
n = 1 bp128/bp128.go, line 162 at r3 (raw file):
4 bytes for length. bp128/bp128.go, line 183 at r3 (raw file):
Really hard to understand the code without comments. Add comments, everywhere. bp128/peachpy/pack.py, line 19 at r1 (raw file):
curp bp128/peachpy/pack.py, line 20 at r1 (raw file):
deltap bp128/peachpy/pack.py, line 21 at r1 (raw file):
prevp // The max integers from the last block. bp128/peachpy/pack.py, line 23 at r1 (raw file):
This would load the pointer address in the register. bp128/peachpy/pack.py, line 30 at r1 (raw file):
Everything is in bytes. We have 128 integers, consuming 1024 bytes (8 bytes per uint64). 1024 - 16 byte (128 bit) register = 1008. This is moving the pointer to the last integers in the slice, so they will fill up a register. bp128/peachpy/pack.py, line 31 at r1 (raw file):
Also explain the calculation here. bp128/peachpy/pack.py, line 34 at r1 (raw file):
What is XMMRegister? 16 bytes. bp128/peachpy/pack.py, line 34 at r1 (raw file):
Tail bp128/peachpy/pack.py, line 36 at r1 (raw file):
We just stored 16 bytes from what inp is pointing to , into last. posting/list.go, line 99 at r3 (raw file):
Remove ulen, and uidx. Because now you have bi. posting/list.go, line 606 at r3 (raw file):
bi.Length() - bi.StartIdx() posting/list.go, line 763 at r3 (raw file):
Add a warning that this is expensive, and we should avoid doing this. posting/list.go, line 768 at r3 (raw file):
Remove this logic for now. x/x.go, line 238 at r3 (raw file):
sz int // store it and advance it with off x/x.go, line 267 at r3 (raw file):
Slice(n int) x/x.go, line 276 at r3 (raw file):
just return sz directly. x/x.go, line 303 at r3 (raw file):
Assert that b.off >= 0. Comments from Reviewable |
Review status: 18 of 24 files reviewed at latest revision, 24 unresolved discussions. algo/uidlist.go, line 48 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. algo/uidlist.go, line 54 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. algo/uidlist.go, line 80 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. algo/uidlist.go, line 103 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Don't need to use index i think, we only jump within a block. If we jump to next block we would end up decompressing and coming back to older block algo/uidlist.go, line 225 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. bp128/bp128.go, line 162 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. bp128/bp128.go, line 183 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. bp128/peachpy/pack.py, line 19 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
This is not current, this is start of input slice. We use in_offset to access current pointer value bp128/peachpy/pack.py, line 20 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
This is not delta, it points to the start of output slice. bp128/peachpy/pack.py, line 21 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. bp128/peachpy/pack.py, line 23 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. bp128/peachpy/pack.py, line 30 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. bp128/peachpy/pack.py, line 31 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. bp128/peachpy/pack.py, line 34 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. bp128/peachpy/pack.py, line 34 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. bp128/peachpy/pack.py, line 36 at r1 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. posting/list.go, line 99 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. posting/list.go, line 606 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. posting/list.go, line 763 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. posting/list.go, line 768 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. x/x.go, line 238 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. x/x.go, line 267 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. x/x.go, line 276 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. x/x.go, line 303 at r3 (raw file): Previously, manishrjain (Manish R Jain) wrote…
Done. Comments from Reviewable |
Reviewed 6 of 6 files at r4. bp128/bp128.go, line 270 at r4 (raw file):
s/uncompress/decompress Comments from Reviewable |
This commit brings following new changes from badger This commit also disable conflict detection in badger to save memory. ``` 0dfb8b4 Changelog for v20.07.0 (#1411) 03ba278 Add missing changelog for v2.0.3 (#1410) 6001230 Revert "Compress/Encrypt Blocks in the background (#1227)" (#1409) 800305e Revert "Buffer pool for decompression (#1308)" (#1408) 63d9309 Revert "fix: Fix race condition in block.incRef (#1337)" (#1407) e0d058c Revert "add assert to check integer overflow for table size (#1402)" (#1406) d981f47 return error if the vlog writes exceeds more that 4GB. (#1400) 7f4e4b5 add assert to check integer overflow for table size (#1402) 8e896a7 Add a contribution guide (#1379) b79aeef Avoid panic on multiple closer.Signal calls (#1401) 717b89c Enable cross-compiled 32bit tests on TravisCI (#1392) 09dfa66 Update ristretto to commit f66de99 (#1391) 509de73 Update head while replaying value log (#1372) e013bfd Rework DB.DropPrefix (#1381) 3042e37 pre allocate cache key for the block cache and the bloom filter cache (#1371) 675efcd Increase default valueThreshold from 32B to 1KB (#1346) 158d927 Remove second initialization of writech in Open (#1382) d37ce36 Tests: Use t.Parallel in TestIteratePrefix tests (#1377) 3f4761d Force KeepL0InMemory to be true when InMemory is true (#1375) dd332b0 Avoid panic in filltables() (#1365) c45d966 Fix assert in background compression and encryption. (#1366) ```
This change is