Re: [hub] Porting and pre-review experiments

Ion Gaztañaga via Boost <[email protected]>
Newsgroups gmane.comp.lib.boost.devel
Message-ID <[email protected]>
El 21/04/2026 a las 18:25, Joaquin M López Muñoz via Boost escribió:
> At this microlevel, it's hard to beat a local mask-based loop as 
> boost::container::hub uses.

Very hard. I was crazy trying to know why nest was behind in the 
for_each bench without luck. It turns that doing:

pbb->mask & (full << 1 << std::size_t(n));

vs (note no std::size_t conversion on n, which is an int)

pbb->mask & (full << 1 << n);

was a 5% improvement because converting int to uint64 before shifting 
was a noticeable impact, I was quite shocked.

I think the porting performance is on par with the proposal in my 
machine, in case you want to test it:

https://github.com/boostorg/container/blob/develop/experimental/bench_hub.cpp

Ion
_______________________________________________
Boost mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.boost.org/mailman3/lists/boost.lists.boost.org/
Archived at: https://lists.boost.org/archives/list/[email protected]/message/N5OO3SSEFEK4ZDOOP3INUH5M5LNM735X/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.