From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: Perferr cond over case? Date: Mon, 12 Oct 2009 10:03:39 +0200 Organization: Organization?!? Message-ID: <87fx9p599g.fsf@lola.goethe.zz> References: <87fx9pre0y.fsf@galatea.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1255336849 25939 80.91.229.12 (12 Oct 2009 08:40:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Oct 2009 08:40:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Oct 12 10:40:41 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 1MxGSM-0006Bp-I0 for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Oct 2009 10:40:38 +0200 Original-Received: from localhost ([127.0.0.1]:43945 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MxGSL-0002Fz-St for geh-help-gnu-emacs@m.gmane.org; Mon, 12 Oct 2009 04:40:37 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:/FCsdiWH459IgLpI+dOSWrB/yB4= Original-Lines: 25 Original-NNTP-Posting-Date: 12 Oct 2009 10:03:39 CEST Original-NNTP-Posting-Host: 1b2f7106.newsspool2.arcor-online.net Original-X-Trace: DXC=CNMA5QXVoE`UoRk[hk2WalA9EHlD; 3Ycb4Fo<]lROoRa8kF5MOK`hZS4PdkOibS]3Q0M5Q3g Original-X-Complaints-To: usenet-abuse@arcor.de Original-Xref: news.stanford.edu gnu.emacs.help:173783 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:68871 Archived-At: pjb@informatimago.com (Pascal J. Bourguignon) writes: > Nordlöw writes: > >> Does the use of the cl macro case() incurr some loss of performance >> compare to using cond() instead? > > (macroexpand '(case (* 2 2 2 2 3) > (10 'one) > ((24 42) 'two) > ((3 33) 'three) > (otherwise 'unknown))) > --> > (let ((--cl-var-- (* 2 2 2 2 3))) > (cond ((eql --cl-var-- (quote 10)) (quote one)) > ((member* --cl-var-- (quote (24 42))) (quote two)) > ((member* --cl-var-- (quote (3 33))) (quote three)) > (t (quote unknown)))) > > What do you think? Before or after byte compilation? -- David Kastrup