From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Politz Newsgroups: gmane.emacs.bugs Subject: bug#14776: 24.3.50; [PATCH] parse-time-string performance Date: Wed, 03 Jul 2013 03:27:31 +0200 Message-ID: <87obakxwjg.fsf@hochschule-trier.de> References: <87sizwxwu2.fsf@hochschule-trier.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1372814950 6821 80.91.229.3 (3 Jul 2013 01:29:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Jul 2013 01:29:10 +0000 (UTC) To: 14776@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 03 03:29:10 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UuBsb-00042w-Ve for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Jul 2013 03:29:10 +0200 Original-Received: from localhost ([::1]:59587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuBsb-0006vL-EC for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Jul 2013 21:29:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuBsW-0006vD-Qb for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2013 21:29:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuBsU-0006pe-Cg for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2013 21:29:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuBsU-0006pa-A9 for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2013 21:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UuBsT-0004ok-N0 for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2013 21:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Politz Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jul 2013 01:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14776 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.137281488218443 (code B ref -1); Wed, 03 Jul 2013 01:29:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Jul 2013 01:28:02 +0000 Original-Received: from localhost ([127.0.0.1]:53250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UuBrV-0004nD-Je for submit@debbugs.gnu.org; Tue, 02 Jul 2013 21:28:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49676) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UuBrU-0004mu-1I for submit@debbugs.gnu.org; Tue, 02 Jul 2013 21:28:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuBrL-0006RS-Cb for submit@debbugs.gnu.org; Tue, 02 Jul 2013 21:27:54 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuBrL-0006RO-9h for submit@debbugs.gnu.org; Tue, 02 Jul 2013 21:27:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51381) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuBrI-0006sa-KL for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2013 21:27:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UuBrG-0006Q2-Bj for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2013 21:27:48 -0400 Original-Received: from gateway-b.fh-trier.de ([143.93.54.182]:45313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UuBrG-0006OM-5I for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2013 21:27:46 -0400 X-Virus-Scanned: by Amavisd-new + McAfee uvscan + ClamAV [Rechenzentrum Hochschule Trier] Original-Received: from luca (dslb-178-004-156-065.pools.arcor-ip.net [178.4.156.65]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: politza) by gateway-b.fh-trier.de (Postfix) with ESMTPSA id A923917B4B3 for ; Wed, 3 Jul 2013 03:27:31 +0200 (CEST) Original-Received: from localhost ([127.0.0.1] helo=luca) by luca with esmtp (Exim 4.72) (envelope-from ) id 1UuBr1-00082l-1U for bug-gnu-emacs@gnu.org; Wed, 03 Jul 2013 03:27:31 +0200 In-Reply-To: <87sizwxwu2.fsf@hochschule-trier.de> (Andreas Politz's message of "Wed, 03 Jul 2013 03:21:09 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75830 Archived-At: --=-=-= Content-Type: text/plain Wrong patch, sorry. This it is. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=parse-date-1.diff.gz === 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") --=-=-=--