From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: thierry.volpiatto@gmail.com Newsgroups: gmane.emacs.help Subject: Re: case-insensitive string< Date: Fri, 17 Apr 2009 23:17:48 +0200 Message-ID: <871vrrm137.fsf@tux.homenetwork> 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 1240004573 15551 80.91.229.12 (17 Apr 2009 21:42:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 17 Apr 2009 21:42:53 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 17 23:44:13 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 1Luvr2-0006aK-CS for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Apr 2009 23:44:12 +0200 Original-Received: from localhost ([127.0.0.1]:60714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Luvpd-0001fu-GY for geh-help-gnu-emacs@m.gmane.org; Fri, 17 Apr 2009 17:42:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LuvYB-0008C9-BF for help-gnu-emacs@gnu.org; Fri, 17 Apr 2009 17:24:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LuvYA-0008Bk-MC for help-gnu-emacs@gnu.org; Fri, 17 Apr 2009 17:24:43 -0400 Original-Received: from [199.232.76.173] (port=39878 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LuvYA-0008BU-FV for help-gnu-emacs@gnu.org; Fri, 17 Apr 2009 17:24:42 -0400 Original-Received: from fg-out-1718.google.com ([72.14.220.153]:7770) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LuvY9-0003DD-U8 for help-gnu-emacs@gnu.org; Fri, 17 Apr 2009 17:24:42 -0400 Original-Received: by fg-out-1718.google.com with SMTP id l27so163308fgb.7 for ; Fri, 17 Apr 2009 14:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:references :face:date:in-reply-to:message-id:user-agent:mime-version :content-type; bh=9vSkUwb8u4NViA4S+goJygIlZyJ5XpZ7g+lqVgWJtLk=; b=An4vcUXABEACNhrRV6o0V2rlEZDc3htkkW229GHGqaDaLZ5s7cG1VgRk3gkk+fKJz8 NXnnBdZxI+wFN/Cvy84hlibpdRz3rN9659aQvX3ox8vEY8jcy3wv5WG0HkmC40d0C8Xt zeguGD1F6I66ZFbQI3aHaeXxZcfFd58/VtUBY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=uTxPzFn/zefYj5UG+NfOzXSuf03oVfRhbW1BSbxT2RuFgog/CzMDX6thxAEEfF7ob5 9/Zgq+mczfe7xJEBDrCwLdX//UeWHNTE2HiauAjMMb87+8mXeeeju51yMtch6ZQcW008 4kX4PmE3bCIYaT+GNE1fQkb9syWEF4saSy6w0= Original-Received: by 10.86.61.13 with SMTP id j13mr2252141fga.68.1240003479933; Fri, 17 Apr 2009 14:24:39 -0700 (PDT) Original-Received: from tux.homenetwork (193.77.197-77.rev.gaoland.net [77.197.77.193]) by mx.google.com with ESMTPS id 12sm1483898fgg.2.2009.04.17.14.24.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 17 Apr 2009 14:24:39 -0700 (PDT) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEUHAwNfJRBVTESlTym0 RB/OwKFivhZqAAAACXBIWXMAAAsSAAALEgHS3X78AAAACXZwQWcAAAAwAAAAMADO7oxXAAABeElE QVQ4y3VTW47CMAyMwwUyTfYfUvG/wfC/ET4B0t7/KmsHurRgXFVVPRm/xglhsRj2+npW98G3+Amp tS5BXxl3SqzcXGRuEyf7n5lPA9jXetNPRhE7EJkzfz8YWnIgBSwW95TK4H79/t4GINKNADWj4PgA DiJX/ZxFDzDXeb4oYMw7kNUvyMzcaj3ioICG4hCKEShkPpwQ49Q05nnkGAQLDFDdExjm0qpowBYA Wi61bDlFU1GW0WbY2dSJYX5ZD2S0AiZL+rPyE19TpMzP2IvNWly+NkuWNgD4pO2oL73IQXoSyVX2 NHna7tgadWRXoCdvf2guqEcvGHqZwE520iRD0/QCYiiTE+U21w1Qxvg6iSp9fbIiDCnSAelDkCVF Vn+HekqXzRybwJ40xF4DMRG6SWGK9G1lYzHSxLYEm05GWbpJCB6A9tb9A3BGn2XdwJbS/WuInj74 4QNF8sVFdP3vl+5tgYp4Ev7fyrfFMkXgElDgV4uV/w8TWEeLCIGJ/AAAACV0RVh0Y3JlYXRlLWRh dGUAMjAwOC0wNS0zMVQyMDoxNDoyMiswMDowMAS7YjIAAAARdEVYdGpwZWc6Y29sb3JzcGFjZQAy LHVVnwAAACB0RVh0anBlZzpzYW1wbGluZy1mYWN0b3IAMngyLDF4MSwxeDFJ+qa0AAAAJXRFWHRt b2RpZnktZGF0ZQAyMDA3LTEwLTI4VDE2OjA4OjQ4KzAwOjAw44nspgAAAABJRU5ErkJggg== In-Reply-To: (Nikolaj Schumacher's message of "Fri, 17 Apr 2009 23:04:43 +0200") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.92 (gnu/linux) 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:63825 Archived-At: Nikolaj Schumacher writes: > 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. > Ok, that's good to know. Thank you. -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France