Modest performance improvement

Exploits that it is faster to use identity-based lookups instead of equals() based lookups.
Merge branch 'feature/perf' into develop