Assuming it's actually necessary to do this check very efficiently, replace the hack based on caching a pointer, with a different one that caches the string comparison result in the operator object.
Assuming it's actually necessary to do this check very efficiently, replace the hack based on caching a pointer, with a different one that caches the string comparison result in the operator object.