Parsing dates from strings can be surprisingly expensive — more than once I’ve
seen it show up as the primary hot-spot in code that reads files or parses
network data. NSDateFormatter is very flexible, but you pay for that in speed.
If you only need to parse a single simple date/time format you
This may not be that useful in all circumstances - I always send dates as
milliseconds since the UNIX epoch as 64-bit signed integers. Those are *way*
faster to parse.
On Sep 10, 2013, at 0:11, Jens Alfke j...@mooseyard.com wrote:
Parsing dates from strings can be surprisingly expensive — more
Le 9 sept. 2013 à 18:11, Jens Alfke j...@mooseyard.com a écrit :
Parsing dates from strings can be surprisingly expensive — more than once
I’ve seen it show up as the primary hot-spot in code that reads files or
parses network data. NSDateFormatter is very flexible, but you pay for that
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 j...@mooseyard.com wrote:
[..]
[fg160,160,160;16:34:40.488| [fg0,128,0;[;NSDateFormatter took 26.97 µsec
[fg160,160,160;16:34:48.649|
On Sep 9, 2013, at 19:05 , Jean-Daniel Dupas devli...@shadowlab.org wrote:
Le 9 sept. 2013 à 18:11, Jens Alfke j...@mooseyard.com a écrit :
[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;[;CBLParseDatetook
On Sep 9, 2013, at 19:20 , Tito Ciuro tci...@mac.com wrote:
On Sep 9, 2013, at 10:14 AM, Marcel Weiher marcel.wei...@gmail.com wrote:
Premature optimization is the root of all evil!
What's premature about it?
Nothing:
Er, I misspelled: “very cool, nice job!”
:-)
Marcel
What's premature about it?
-- Tito
On Sep 9, 2013, at 10:14 AM, Marcel Weiher marcel.wei...@gmail.com 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 j...@mooseyard.com wrote:
[..]
On Sep 9, 2013, at 19:35 , Jens Alfke j...@mooseyard.com wrote:
On Sep 9, 2013, at 10:14 AM, Marcel Weiher marcel.wei...@gmail.com wrote:
Premature optimization is the root of all evil!
I’m not sure if you meant that ironically, but it’s absolutely not premature.
Absolutely! On both
On Sep 9, 2013, at 10:14 AM, Marcel Weiher marcel.wei...@gmail.com wrote:
Premature optimization is the root of all evil!
I’m not sure if you meant that ironically, but it’s absolutely not premature.
I’ve run into major NSDateFormatter bottlenecks — as in “hm, over half the time
to open this
On Sep 9, 2013, at 11:35 AM, Jens Alfke j...@mooseyard.com wrote:
I’m not sure if you meant that ironically, but it’s absolutely not premature.
I’ve run into major NSDateFormatter bottlenecks — as in “hm, over half the
time to open this file is spent inside NSDateFormatter” — at least twice,
On Sep 9, 2013, at 10:48 AM, Jeffrey Oleander jgo...@yahoo.com wrote:
The issue is users entering dates […] am sorely wishing I could just enforce
ISO date entry as in the quoted example by using pop-up menus. Some do, but
the dread of customer rebellion is strong, and they want to enter
On Sep 9, 2013, at 09:25 , Maxthon Chan xcvi...@me.com wrote:
This may not be that useful in all circumstances - I always send dates as
milliseconds since the UNIX epoch as 64-bit signed integers. Those are *way*
faster to parse.
Yes. It's ridiculous that a lot of JSON APIs send ISO
Just to add a tiny wrinkle:
On Sep 9, 2013, at 20:27 , Jens Alfke j...@mooseyard.com wrote:
On Sep 9, 2013, at 10:48 AM, Jeffrey Oleander jgo...@yahoo.com wrote:
[..] Some do, but the dread of customer rebellion is strong, and they want
to enter them in the slap-dash, hurried, harried ways
On 9 Sep 2013, at 20:29, Rick Mann rm...@latencyzero.com wrote:
On Sep 9, 2013, at 09:25 , Maxthon Chan xcvi...@me.com wrote:
This may not be that useful in all circumstances - I always send dates as
milliseconds since the UNIX epoch as 64-bit signed integers. Those are *way*
faster to
On Sep 9, 2013, at 11:46 , Tom Davie tom.da...@gmail.com wrote:
On 9 Sep 2013, at 20:29, Rick Mann rm...@latencyzero.com wrote:
On Sep 9, 2013, at 09:25 , Maxthon Chan xcvi...@me.com wrote:
This may not be that useful in all circumstances - I always send dates as
milliseconds since
I’m not sure if you meant that ironically, but it’s absolutely not premature.
I’ve run into major NSDateFormatter bottlenecks — as in “hm, over half the
time to open this file is spent inside NSDateFormatter” — at least twice, and
the author of the blog post I linked to says that he also
On 2013 Sep 09, at 13:14, Marcel Weiher wrote:
On 2013 Sep 9, at 18:11 , Jens Alfke j...@mooseyard.com 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;[;CBLParseDatetook
0.47 µsec (58x)
Now, the
17 matches
Mail list logo