alter the return type of the _get_keys method from list to set to speed up member checks as discussed / investigated in #654
_get_keys
list
set