Add a cache for looking up class name in NameClassComparitor

See discussion on #41 .