From: Andreas Politz <politza@hochschule-trier.de>
To: 14776@debbugs.gnu.org
Subject: bug#14776: 24.3.50; [PATCH] parse-time-string performance
Date: Wed, 03 Jul 2013 03:27:31 +0200 [thread overview]
Message-ID: <87obakxwjg.fsf@hochschule-trier.de> (raw)
In-Reply-To: <87sizwxwu2.fsf@hochschule-trier.de> (Andreas Politz's message of "Wed, 03 Jul 2013 03:21:09 +0200")
[-- Attachment #1: Type: text/plain, Size: 35 bytes --]
Wrong patch, sorry. This it is.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: parse-date-1.diff.gz --]
[-- Type: text/x-diff, Size: 1195 bytes --]
=== modified file 'lisp/calendar/parse-time.el'
*** lisp/calendar/parse-time.el 2013-01-01 09:11:05 +0000
--- lisp/calendar/parse-time.el 2013-07-03 01:24:08 +0000
***************
*** 50,63 ****
(aref parse-time-digits char))
(defsubst parse-time-string-chars (char)
! (save-match-data
! (let (case-fold-search str)
! (cond ((eq char ?+) 1)
! ((eq char ?-) -1)
! ((eq char ?:) ?d)
! ((string-match "[[:upper:]]" (setq str (string char))) ?A)
! ((string-match "[[:lower:]]" str) ?a)
! ((string-match "[[:digit:]]" str) ?0)))))
(put 'parse-error 'error-conditions '(parse-error error))
(put 'parse-error 'error-message "Parsing error")
--- 50,64 ----
(aref parse-time-digits char))
(defsubst parse-time-string-chars (char)
! (cond ((eq char ?+) 1)
! ((eq char ?-) -1)
! ((eq char ?:) ?d)
! ((memq char '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9)) ?0)
! ((not (eq (upcase char)
! (downcase char)))
! (cond
! ((eq char (upcase char)) ?A)
! (t ?a)))))
(put 'parse-error 'error-conditions '(parse-error error))
(put 'parse-error 'error-message "Parsing error")
next prev parent reply other threads:[~2013-07-03 1:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-03 1:21 bug#14776: 24.3.50; [PATCH] parse-time-string performance Andreas Politz
2013-07-03 1:27 ` Andreas Politz [this message]
2013-07-03 3:32 ` Glenn Morris
2013-07-03 3:34 ` Glenn Morris
2013-07-04 15:41 ` Andreas Politz
2013-07-04 18:41 ` Lars Magne Ingebrigtsen
2013-07-04 19:47 ` Andreas Politz
2013-07-04 20:31 ` Lars Magne Ingebrigtsen
2013-07-04 21:08 ` Andreas Politz
2013-07-04 21:15 ` Lars Magne Ingebrigtsen
[not found] ` <87hagaeztj.fsf@hochschule-trier.de>
2013-07-06 15:34 ` Lars Ingebrigtsen
2013-07-06 15:50 ` Andreas Politz
2013-07-06 15:56 ` Lars Ingebrigtsen
2013-07-06 16:07 ` Andreas Politz
2013-07-06 17:47 ` Andreas Politz
2013-07-08 14:51 ` Lars Magne Ingebrigtsen
2016-03-01 1:05 ` Lars Ingebrigtsen
2019-06-27 11:12 ` Lars Ingebrigtsen
2013-07-04 22:21 ` Andreas Politz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87obakxwjg.fsf@hochschule-trier.de \
--to=politza@hochschule-trier.de \
--cc=14776@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.