クックパッド主催の第4回potatotipsでiOSのtipsとして日付のフォーマットをするときのパフォーマンスの話をしました。 きっかけ きっかけは何気なくgistを眺めていたときに見つけたこれです。 ↓ Compare the date parsing performance of NSDateFormatter against SQLite's date parser for parsing an iOS 8601 date. NSDateFormatter took 108.163 seconds strptime_l took 21.656 seconds sqlite3 took 7.096 seconds そうそう、NSDateFomatterはけっこう遅いからフォーマットが固定だったりロケール関係ないときはstrptime_l使うよね、アップルのドキュメントにも載ってるし…
![NSDateFormatterのパフォーマンスの話 #potatotips - 24/7 twenty-four seven](https://cdn-ak-scissors.b.st-hatena.com/image/square/cfd36b58c6910503b87fbc83eef69b138c4fcb5c/height=288;version=1;width=512/https%3A%2F%2Fcdn.image.st-hatena.com%2Fimage%2Fscale%2Fde90d1891b9f378b13cc49d4d85e67a04f38bdab%2Fbackend%3Dimagemagick%3Bheight%3D1300%3Bversion%3D1%3Bwidth%3D1300%2Fhttp%253A%252F%252Fcdn-ak.f.st-hatena.com%252Fimages%252Ffotolife%252FK%252FKishikawaKatsumi%252F20140214%252F20140214182059.png)