Hi,
  the preliminary polygraph results for using a std::unordered_map with a
perfect hash (generated by gperf) to do RegisteredHeader -> HttpHdr lookups
are in, and are quite disappointing.
The hash is as effective as it can be: two table lookups and simple
calculations. Yet when using it squid loses about 10RPS (on about 2k) over
std::map (-0.5% performance); I guess that for a small hash such as the one
we're using, the effort to walk the hash structure
I'll next try to go the full length and get rid of std::unordered_map and
using gperf for all the work (it stores data in a single const array), and
I'll validate the numbers, but if things won't change significantly, I'll
just stick with std::map.

-- 
    Francesco
_______________________________________________
squid-dev mailing list
[email protected]
http://lists.squid-cache.org/listinfo/squid-dev

Reply via email to