|
From: | David Kastrup |
Subject: | Re: Perferr cond over case? |
Date: | Mon, 12 Oct 2009 10:03:39 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
pjb@informatimago.com (Pascal J. Bourguignon) writes: > Nordlöw <per.nordlow@gmail.com> 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
[Prev in Thread] | Current Thread | [Next in Thread] |