Sstable.bloom_of_chunks: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/Sstable.bend as Sstable Lines 282-288 of mylsm-lsm-store@0.6.0.1/src/Sstable.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/Sstable.bend&start_line=282&end_line=288 import Base import mylsm-lsm-store@0.6.0.1/src/MemTable.bend as MemTable # Four-way chunk build with a two-level fork tree. def bloom_of_chunks(+entries: List<&2, MemTable.Entry>, +nb: Nat) -> Bloom: +num = List.length(&2, MemTable.Entry, entries) +q = Nat.div(num, 4n) a b = bloom_of_chunk(List.take(&2, MemTable.Entry, entries, q), nb) bloom_of_chunk(chunk_third(entries, q, q), nb) c d = bloom_of_chunk(chunk_third(entries, Nat.mul(q, 2n), q), nb) bloom_of_chunk(List.drop(&2, MemTable.Entry, entries, Nat.mul(q, 3n)), nb) bloom_union(bloom_union(a, b), bloom_union(c, d)) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.drop https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.length https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.take https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/MemTable.bend&name=Entry https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Sstable.bend&name=Bloom https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Sstable.bend&name=bloom_of_chunk https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Sstable.bend&name=bloom_union https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/Sstable.bend&name=chunk_third