Re: Optimizing channel lookups

Alexandre Ferrieux wrote:
Replacing a hash lookup of a constant by a simple indirection may be
saving few CPU cycles (though this has yet to be quantified), but more
importantly it saves many human brain-cycles of people looking into
the code and asking themselves "Why on earth did they hide this
there ???".

But hardly anyone looks through the code. You're arguing for doing a
bunch of work for next to no return on that investment other than
"making it easier for you to dig through the code". Hashing a short
string *really* is fast. I measured it two weeks ago, and for situations
involving channels (i.e. with I/O syscalls in the mix, which *are* slow)
the overhead is negligible. I'll continue to argue this until you
present evidence (i.e. measured timings) otherwise. Yes, doing this will
take effort; might as well be yours since it bothers you so much. :-)