Re: Optimizing channel lookups
- From: "Donal K. Fellows" <donal.k.fellows@xxxxxxxxxxxxxxxx>
- Date: Sun, 24 Jun 2007 23:38:36 GMT
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. :-)
Donal.
.
- References:
- Optimizing channel lookups
- From: Alexandre Ferrieux
- Re: Optimizing channel lookups
- From: Don Porter
- Re: Optimizing channel lookups
- From: Alexandre Ferrieux
- Re: Optimizing channel lookups
- From: Joe English
- Re: Optimizing channel lookups
- From: Alexandre Ferrieux
- Re: Optimizing channel lookups
- From: Donal K. Fellows
- Re: Optimizing channel lookups
- From: Alexandre Ferrieux
- Re: Optimizing channel lookups
- From: Donal K. Fellows
- Re: Optimizing channel lookups
- From: Alexandre Ferrieux
- Optimizing channel lookups
- Prev by Date: best tcl ide?
- Next by Date: Perplexing Behavior from Metakit
- Previous by thread: Re: Optimizing channel lookups
- Next by thread: Re: Optimizing channel lookups
- Index(es):