I keep seeing on code reviews that people are instantiating NSDateFormatter whenever they need it, and releasing it shortly afterwards. And then raising questions, why their code is so slow. Well,
is very pricey. You may do not notice it in the simulator but on the real device it has very high price. So, cache it whenever possible. Use static class variable
or an ivar,
it doesn't matter. Just cache it, whenever you stumble upon it in the code. Do not think of it as of premature optimization, the matter of fact is that you'll have to cache it in the future.