News for hackers. Stuff that matters.
Re:Date parsing performance on iOS (NSDateformatter vs sqlite) by stevoski on Saturday September 07, 2013 @10:32AM (#6345184)
A class like NSDateFormatter is designed to handle a wide range of date formats. This usual results in sub-optimal performance. If you find it too slow and you have a known, specific date format you should write a specific fast parser.

I did the same with Java's Integer.parseInt(...) method. It is an interesting task to go through.

Now I'll spend the rest of this rainy afternoon playing around with writing a fast ISO date parser :)

Edit: Seems Java's Joda Time library already does parse ISO dates really quickly. 7 seconds for 4 million on my MBP

Edit: A fast custom date parser for ISO dates I just wrote can parse 4 million dates in 150 milliseconds.

Re:Date parsing performance on iOS (NSDateformatter vs sqlite) by gilgoomesh on Saturday September 07, 2013 @07:48PM (#6347137)
It does seem as though Apple should implement a separate optimized path for the very common case of ISO-8601 date formats.

Although I'm not sure how many people on iOS need millions of dates parsed.

Re:Date parsing performance on iOS (NSDateformatter vs sqlite) by azinman2 on Saturday September 07, 2013 @06:22PM (#6346874)
So are you going to post that iso parser?