|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +nav-class: dark |
| 4 | +categories: joaquin |
| 5 | +title: New Boost library proposal and a talk on how to make C++ ranges faster |
| 6 | +author-id: joaquin |
| 7 | +author-name: Joaquín M López Muñoz |
| 8 | +--- |
| 9 | + |
| 10 | +During Q1 2025, I've been working in the following areas: |
| 11 | + |
| 12 | +### Candidate Boost Bloom Library |
| 13 | + |
| 14 | +During the entire quarter I've been working on a Boost proposal around Bloom filters: |
| 15 | + |
| 16 | +* Repo: [https://github.com/joaquintides/bloom](https://github.com/joaquintides/bloom) |
| 17 | +* Docs: [https://master.bloom.cpp.al/](https://master.bloom.cpp.al/) |
| 18 | + |
| 19 | +Class template `boost::bloom::filter` can be configured to implement a classical Bloom filter |
| 20 | +as well as variations discussed in the literature such as block filters, multiblock filters, and more. |
| 21 | + |
| 22 | +```cpp |
| 23 | +#include <boost/bloom/filter.hpp> |
| 24 | +#include <cassert> |
| 25 | +#include <string> |
| 26 | + |
| 27 | +int main() |
| 28 | +{ |
| 29 | + // Bloom filter of strings with 5 bits set per insertion |
| 30 | + using filter = boost::bloom::filter<std::string, 5>; |
| 31 | + |
| 32 | + // create filter with a capacity of 1'000'000 **bits** |
| 33 | + filter f(1'000'000); |
| 34 | + |
| 35 | + // insert elements (they can't be erased, Bloom filters are insert-only) |
| 36 | + f.insert("hello"); |
| 37 | + f.insert("Boost"); |
| 38 | + //... |
| 39 | + |
| 40 | + // elements inserted are always correctly checked as such |
| 41 | + assert(f.may_contain("hello") == true); |
| 42 | + |
| 43 | + // elements not inserted may incorrectly be identified as such with a |
| 44 | + // false positive rate (FPR) which is a function of the array capacity, |
| 45 | + // the number of bits set per element and generally how the boost::bloom::filter |
| 46 | + // was specified |
| 47 | + if(f.may_contain("bye")) { // likely false |
| 48 | + //... |
| 49 | + } |
| 50 | +} |
| 51 | +``` |
| 52 | +The library is ready for official review, which I plan to ask for in April. Chris Mazakas |
| 53 | +is helping with a very useful vcpkg registry so that future reviewers can |
| 54 | +download and install candidate Boost.Bloom and dependencies with minimal hassle via vcpkg. |
| 55 | + |
| 56 | +### Presentation at using std::cpp 2025 |
| 57 | + |
| 58 | +I prepared and presented the talk "Push is Faster" at the using std::cpp 2025 conference |
| 59 | +in Madrid, March 19-21: |
| 60 | + |
| 61 | +[https://github.com/joaquintides/usingstdcpp2025](https://github.com/joaquintides/usingstdcpp2025) |
| 62 | + |
| 63 | +(The video of the talk will be publicly available in a few weeks.) We discussed |
| 64 | +push and pull paradigms for sequential data processing, why C++ ranges are |
| 65 | +not as fast as they could be, and an alternative design based on so-called |
| 66 | +[transrangers](https://github.com/joaquintides/transrangers). If feedback is positive, |
| 67 | +I may eventually grow the transrangers proof-of-concept library into a full-fledged |
| 68 | +proposal for Boost. |
| 69 | + |
| 70 | +### Boost.Unordered |
| 71 | + |
| 72 | +* Reviewed [PR#299](https://github.com/boostorg/unordered/pull/299) from Chris Mazakas, |
| 73 | +a complete migration of Boost.Unordered documentation to Antora. The new docs are multi-page |
| 74 | +and generally much nicer looking. Great work, Chris! |
| 75 | +* Retouched some aspects of the new Antora docs ([PR#303](https://github.com/boostorg/unordered/pull/303)) |
| 76 | +and filed some pending issues ([#304](https://github.com/boostorg/unordered/issues/304)). |
| 77 | + |
| 78 | +### Boost.Promotion |
| 79 | + |
| 80 | +* Posted a [tweet](https://x.com/Boost_Libraries/status/1884899485186400442) publicizing |
| 81 | +Rubén Pérez's work on module support for Boost. |
| 82 | +* Provided support to Rob Beeston for the creation of a Boost.Unordered poster to be |
| 83 | +displayed at the upcoming WG21 meeting in Sofia, Bulgaria. |
| 84 | + |
| 85 | +### Support to the community |
| 86 | + |
| 87 | +* I've pre-reviewed Jean-Louis Leroy's |
| 88 | +[Boost.OpenMethod](https://github.com/jll63/Boost.OpenMethod) proposal. |
| 89 | +* Supporting the community as a member of the Fiscal Sponsorhip Committee (FSC). Asset |
| 90 | +transfer from the Boost Foundation to the C++ Alliance is still being negotiated, |
| 91 | +I hope all pending issues can be cleared up soon. |
0 commit comments