From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: faster unicode character name completion Date: Mon, 07 Dec 2009 21:29:48 -0500 Message-ID: References: <87einfbxdw.fsf@red-bean.com> <87fx7r68s4.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1260239410 21961 80.91.229.12 (8 Dec 2009 02:30:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 8 Dec 2009 02:30:10 +0000 (UTC) Cc: cyd@stupidchicken.com, emacs-devel@gnu.org To: Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 08 03:30:02 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NHppx-00046v-GH for ged-emacs-devel@m.gmane.org; Tue, 08 Dec 2009 03:30:01 +0100 Original-Received: from localhost ([127.0.0.1]:50913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHppx-0006wG-4T for ged-emacs-devel@m.gmane.org; Mon, 07 Dec 2009 21:30:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHppr-0006vw-22 for emacs-devel@gnu.org; Mon, 07 Dec 2009 21:29:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHppm-0006uy-KT for emacs-devel@gnu.org; Mon, 07 Dec 2009 21:29:54 -0500 Original-Received: from [199.232.76.173] (port=59018 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHppm-0006uv-EF for emacs-devel@gnu.org; Mon, 07 Dec 2009 21:29:50 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:49067 helo=ironport2-out.pppoe.ca) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHppm-0003Hm-97 for emacs-devel@gnu.org; Mon, 07 Dec 2009 21:29:50 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhIFAMVIHUvO+INN/2dsb2JhbACBTNc0hDMEih0 X-IronPort-AV: E=Sophos;i="4.47,358,1257138000"; d="scan'208";a="50960206" Original-Received: from 206-248-131-77.dsl.teksavvy.com (HELO ceviche.home) ([206.248.131.77]) by ironport2-out.pppoe.ca with ESMTP; 07 Dec 2009 21:29:49 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id CAB9A70208; Mon, 7 Dec 2009 21:29:48 -0500 (EST) In-Reply-To: (Kenichi Handa's message of "Tue, 08 Dec 2009 10:45:56 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118383 Archived-At: > I don't know. The info says this: > -- Function: completion-table-dynamic function > This function is a convenient way to write a function that can act > as programmed completion function. The argument FUNCTION should be > a function that takes one argument, a string, and returns an alist > of possible completions of it. You can think of > `completion-table-dynamic' as a transducer between that interface > and the interface for programmed completion functions. > I thought that FUNCTION should return an alist that contains > ONLY valid completions. No, it can (and often is) a superset. > Ah, interesting approach. But, I've just found that > dotimes-with-progress-reporter of the original code didn't > exclude the big unused range U+30000..U+DFFFF (about 75% of > the range currently checked). Just excluding that part in > the original code achieves almost the same performance as > your patch. Attached is that simpler version. Feel free to install that, then. Stefan