Boost logo

Boost :

Subject: Re: [boost] Any interest in Compile Time Hash Containers library?
From: degski (degski_at_[hidden])
Date: 2019-01-25 04:20:39

On Fri, 25 Jan 2019 at 01:00, Ivan Matek via Boost <boost_at_[hidden]>

> I think that if you want best performance you want to template on values
> since if for example you only template on type, then you can not know some
> very useful stuff at compile time. We want to pick a constant for universal
> hashing that works great for our values. Consider example where we are
> lucky and we get no collisions.

How is this [whatever it is] different from frozen ( )? From what I read, it
[frozen] always achieves perfect hashing. The good thing about frozen is
that it's not pie-in-the-sky and it actually works.

If we know that at compile time compiler
> can remove the loop(probe until some condition) since it knows iteration
> count is 1.
> If that value is just some member variable that can be 1 or 2 or 5
> depending on data compiler can not remove that loop.
> In other words I believe that for best performance codegen for different
> values needs to be different.
> I am happy to be proven wrong. :)

Did you, or did you not write the code [you say it's not written and then
post timing results, it's confusing]? How can we prove you wrong (or
right), if all we see is lots of words and no code? Stop argumenting and
start showing some code.


*“If something cannot go on forever, it will stop" - Herbert Stein*

Boost list run by bdawes at, gregod at, cpdaniel at, john at