proftpd/proftpd — pull request #6 by Castaglia (2014-05-22 06:02:41+00:00)
Title: When storing symbols in the symbol table hash ("stash"), stop storing al...

...l

symbol types (CMD, CONF, AUTH, and HOOK) all in the same table. Instead,
have different tables for each different type. This makes it faster when
looking up (by name) a symbol of a given type; less symbol names to grovel
through and compare.

And speaking of symbol comparisons, this change also stores the hash value
(of the symbol name) as part of the symbol data. Thus when doing symbol
lookups, the hash value is compared FIRST, and only if that value matches
will the more in-depth comparison (by name length, name content) be done.

The overall effect should be a net gain in speed (less latency when dispatching
e.g. commands, auth lookups, parsing), and a drop in CPU (due to fewer
string comparisons hopefully).