|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +nav-class: dark |
| 4 | +categories: joaquin |
| 5 | +title: Hubs, intervals and math |
| 6 | +author-id: joaquin |
| 7 | +author-name: Joaquín M López Muñoz |
| 8 | +--- |
| 9 | + |
| 10 | +During Q1 2026, I've been working in the following areas: |
| 11 | + |
| 12 | +### `boost::container::hub` |
| 13 | + |
| 14 | +[`boost::container::hub`](https://github.com/joaquintides/hub) is a nearly drop-in replacement of |
| 15 | +C++26 [`std::hive`](https://eel.is/c++draft/sequences#hive) sporting a simpler data structure and |
| 16 | +providing competitive performance with respect to the de facto reference implementation |
| 17 | +[`plf::hive`](https://github.com/mattreecebentley/plf_hive). When I first read about `std::hive`, |
| 18 | +I couldn't help thinking how complex the internal design of the container is, and wondered |
| 19 | +if something leaner could in fact be more effective. `boost::container::hub` critically relies |
| 20 | +on two realizations: |
| 21 | + |
| 22 | +* Identification of empty slots by way of [`std::countr_zero`](https://en.cppreference.com/w/cpp/numeric/countr_zero.html) |
| 23 | +operations on a bitmask is extremely fast. |
| 24 | +* Modern allocators are very fast, too: `boost::container::hub` does many more allocations |
| 25 | +than `plf::hive`, but this doesn't degrade its performance significantly (although it affects |
| 26 | +cache locality). |
| 27 | + |
| 28 | +`boost::container::hub` is formally proposed for inclusion in Boost.Container and will be |
| 29 | +officially reviewed April 16-26. Ion Gaztañaga serves as the review manager. |
| 30 | + |
| 31 | +### using std::cpp 2026 |
| 32 | + |
| 33 | +I gave my talk ["The Mathematical Mind of a C++ Programmer"](https://github.com/joaquintides/usingstdcpp2026) |
| 34 | +at the [using std::cpp 2026](https://eventos.uc3m.es/141471/detail/using-std-cpp-2026.html) conference |
| 35 | +taking place in Madrid during March 16-19. I had a lot of fun preparing the presentation and |
| 36 | +delivering the actual talk, and some interesting discussions were had around it. |
| 37 | +This is a subject I've been wanting to talk about for decades, so I'm somewhat relieved I finally |
| 38 | +got it over with this year. Always happy to discuss C++ and math, so if you have feedback |
| 39 | +or want to continue the conversation, please reach out to me. |
| 40 | + |
| 41 | +### Boost.Unordered |
| 42 | + |
| 43 | +* Written maintenance fixes |
| 44 | +[PR#328](https://github.com/boostorg/unordered/pull/328), |
| 45 | +[PR#335](https://github.com/boostorg/unordered/pull/335), |
| 46 | +[PR#336](https://github.com/boostorg/unordered/pull/336), |
| 47 | +[PR#337](https://github.com/boostorg/unordered/pull/337), |
| 48 | +[PR#339](https://github.com/boostorg/unordered/pull/339), |
| 49 | +[PR#344](https://github.com/boostorg/unordered/pull/344), |
| 50 | +[PR#345](https://github.com/boostorg/unordered/pull/345). Some of these fixes are related |
| 51 | +to Node.js vulnerabilities in the Antora setup used for doc building: as the number |
| 52 | +of Boost libraries using Antora is bound to grow, maybe we should think of an automated |
| 53 | +way to get these vulnerabilities automatically fixed for the whole project. |
| 54 | +* Reviewed and merged |
| 55 | +[PR#317](https://github.com/boostorg/unordered/pull/317), |
| 56 | +[PR#332](https://github.com/boostorg/unordered/pull/332), |
| 57 | +[PR#334](https://github.com/boostorg/unordered/pull/334), |
| 58 | +[PR#341](https://github.com/boostorg/unordered/pull/341), |
| 59 | +[PR#342](https://github.com/boostorg/unordered/pull/342). Many thanks to |
| 60 | +Sam Darwin, Braden Ganetsky and Andrey Semashev for their contributions. |
| 61 | + |
| 62 | +### Boost.Bimap |
| 63 | + |
| 64 | +Merged |
| 65 | +[PR#31](https://github.com/boostorg/bimap/pull/31) (`std::initializer_list` |
| 66 | +constructor) and provided testing and documentation for this new |
| 67 | +feature ([PR#54](https://github.com/boostorg/bimap/pull/54)). The original |
| 68 | +PR was silently sitting on the queue for more than four years and it |
| 69 | +was only when it was brought to my attention in a Reddit conversation that |
| 70 | +I got to take a look at it. Boost.Bimap needs an active mantainer, |
| 71 | +I guess I could become this person. |
| 72 | + |
| 73 | +### Boost.ICL |
| 74 | + |
| 75 | +[Recent changes](https://github.com/llvm/llvm-project/pull/161366) in libc++ v22 |
| 76 | +code for associative container lookup have resulted in the |
| 77 | +[breakage of Boost.ICL](https://github.com/boostorg/icl/issues/51). |
| 78 | +My understanding is that the changes in libc++ are not |
| 79 | +standards conformant, and there's an [ongoing discussion](https://github.com/llvm/llvm-project/issues/187667) |
| 80 | +on that; in the meantime, I wrote and proposed a [PR](https://github.com/boostorg/icl/pull/54) |
| 81 | +to Boost.ICL that fixes the problem (pending acceptance). |
| 82 | + |
| 83 | +### Support to the community |
| 84 | + |
| 85 | +* I've been helping a bit with Mark Cooper's very successful |
| 86 | +[Boost Blueprint](https://x.com/search?q=%22Boost%20Blueprint%22&src=typed_query&f=live) |
| 87 | +series on X. |
| 88 | +* Supporting the community as a member of the Fiscal Sponsorship Committee (FSC). |
| 89 | + |
| 90 | + |
| 91 | + |
0 commit comments