caching ComparatorType