[Swan-dev] avoid two linear lookups
D. Hugh Redelmeier
hugh at mimosa.com
Wed Sep 6 15:33:07 UTC 2017
commit e54650eb143644eaf0c9ed90c0488aa4ba5a86c9:
pluto: print full name in 'ESP algorithm newest:' line
and avoid two linear lookups
enum_short_name is not linear in any real sense. It loops over the list
of ranges, not within each range.
esp_transformid_names and auth_alg_names each have two ranges.
Avoiding several subroutine calls is more significant, but is unlikely to
be consequential.
enum_short_name is linear in the length of the prefix because it calls
strip_prefix, but that isn't a lookup.
More information about the Swan-dev
mailing list