[squid-dev] Preliminary results of gperf+std::unordered_map

Kinkie gkinkie at gmail.com
Thu Aug 6 19:50:48 UTC 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20150806/3f0cfe81/attachment.html>


More information about the squid-dev mailing list