Re: 30x faster JSON date parsing
Re: 30x faster JSON date parsing
- Subject: Re: 30x faster JSON date parsing
- From: Tito Ciuro <email@hidden>
- Date: Mon, 09 Sep 2013 10:20:54 -0700
What's premature about it?
-- Tito
> On Sep 9, 2013, at 10:14 AM, Marcel Weiher <email@hidden> wrote:
>
> Hi Jens,
>
> Premature optimization is the root of all evil!
>
> Er, I misspelled: “very cool, nice job!”
>
>> On Sep 9, 2013, at 18:11 , Jens Alfke <email@hidden> wrote:
>>
>> [..]
>> [fg160,160,160;16:34:40.488| [fg0,128,0;[;NSDateFormatter took 26.97 µsec
>> [fg160,160,160;16:34:48.649| [fg0,128,0;[;CBLParseDate took 0.47 µsec (58x)
>>
>> Now, the tradeoff is that the optimized code parses only ISO 8601 dates — this is the informal standard used with JSON, so it’s become really common. It looks like “2013-09-09T17:52:12Z”.
>
> That might actually be a feature. (Also: didn’t know ISO did informal standards…)
>
>>
>> [1] http://vombat.tumblr.com/post/60530544401/date-parsing-performance-on-ios-nsdateformatter-vs
>> [2] https://github.com/couchbase/couchbase-lite-ios/blob/master/Source/CBLParseDate.c
>
> Marcel
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden