Remove class name string comparison bottleneck