On my laptop (fairly recent), 2000 iterations takes less than 2 ms. I compared with an other implementation based on `get_declared_classes()` (which is the only other way I can think of for getting the case of the declared class name), but it's more that 10x slower.