From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help Subject: Re: case-insensitive string< Date: Fri, 17 Apr 2009 23:04:43 +0200 Message-ID: References: <87ab6fco9v.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1240003400 11521 80.91.229.12 (17 Apr 2009 21:23:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Apr 2009 21:23:20 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: thierry.volpiatto@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 17 23:24:38 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LuvY1-0007na-4A for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Apr 2009 23:24:33 +0200 Original-Received: from localhost ([127.0.0.1]:36430 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LuvWc-0006Qg-5s for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Apr 2009 17:23:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LuvEv-0008DH-4N for help-gnu-emacs@gnu.org; Fri, 17 Apr 2009 17:04:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LuvEt-0008BL-8t for help-gnu-emacs@gnu.org; Fri, 17 Apr 2009 17:04:48 -0400 Original-Received: from [199.232.76.173] (port=58445 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LuvEt-0008BD-0w for help-gnu-emacs@gnu.org; Fri, 17 Apr 2009 17:04:47 -0400 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:34522) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LuvEs-00012D-FK for help-gnu-emacs@gnu.org; Fri, 17 Apr 2009 17:04:46 -0400 Original-Received: from thursday (f050196013.adsl.alicedsl.de [78.50.196.13]) by dd18200.kasserver.com (Postfix) with ESMTP id DD484180D9D69; Fri, 17 Apr 2009 23:04:48 +0200 (CEST) In-Reply-To: <87ab6fco9v.fsf@tux.homenetwork> (thierry volpiatto's message of "Fri, 17 Apr 2009 17:07:08 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (darwin) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63823 Archived-At: thierry.volpiatto@gmail.com wrote: > (sort* (list "abc" "abd" "abCde" "cade" "ABC") 'string< :key 'downcase) > ("abc" "ABC" "abCde" "abd" "cade") > > But not sure it is faster than downcasing all strings before sorting. > Need testing. It's significantly slower. It's the same as using: (lambda (a b) (string< (downcase a) (downcase b))) so that's O(n*log(n)) calls to downcase, instead of n. regards, Nikolaj Schumacher