6afbc02052
by using a small hash function before doing the strcmp. The hask key for each registry entry is computed when it is added to the registry. When we're doing a query, instead of comparing the 2 strings we first check if the hash key match, and if they do match then we compare the 2 strings in order to make sure we eliminate collisions from our answers. There is some benefit in terms of performance. It's hardly visible for few processes, but it start showing up when the number of processes increase. In fact the number of strcmp in the trace file drastically decrease. The main reason it works well, is because most of the keys start with basically the same chars (such as orte-blahblah) which transform the strcmp on a loop over few chars. This commit was SVN r14791. |
||
---|---|---|
.. | ||
base | ||
null | ||
proxy | ||
replica | ||
gpr_types.h | ||
gpr.h | ||
Makefile.am |