Subject: Re: bug#14776: 24.3.50; [PATCH] parse-time-string performance

From: Andreas Politz <[email-masked]>
Date: Thu, 04 Jul 2013 23:08:33 +0200

Lars Magne Ingebrigtsen <[email-masked]> writes:

> It's not much of a bottleneck, no:
>
> (benchmark-elapse (dotimes (i 10000) (parse-time-string "Thu, 04 Jul 2013 20:06:00 +0200")))
> => 1.120856647

=> 0.215108395
;-O

But only with this:

> But sorting a summary buffer of 5K messages on Date (which some people
> do) might get a performance boost.  But I was thinking that it might be
> more likely that parse-datetime parses more date strings correctly than
> the version in parse-time.el.  

It looks that way, i.e. parse-time-string is pretty simple compared to
that.  But most Date header I've seen popping up in my mail seem to
adhere to a strict rfc2822 format anyway, except for the occasional
non-strict timezone.

-ap