From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Liu Newsgroups: gmane.emacs.devel Subject: Re: trunk r117969: Font-lock `cl-flet*', too. Date: Mon, 29 Sep 2014 07:09:10 +0800 Message-ID: References: <87bnpz981y.fsf@zigzag.favinet> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1411945792 20390 80.91.229.3 (28 Sep 2014 23:09:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Sep 2014 23:09:52 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 29 01:09:45 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XYNb6-00043j-0u for ged-emacs-devel@m.gmane.org; Mon, 29 Sep 2014 01:09:44 +0200 Original-Received: from localhost ([::1]:33460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYNb5-0001MK-Cn for ged-emacs-devel@m.gmane.org; Sun, 28 Sep 2014 19:09:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYNau-0001LL-EW for emacs-devel@gnu.org; Sun, 28 Sep 2014 19:09:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYNak-0002EG-AG for emacs-devel@gnu.org; Sun, 28 Sep 2014 19:09:32 -0400 Original-Received: from mail-pd0-x230.google.com ([2607:f8b0:400e:c02::230]:51662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYNak-0002Db-2G for emacs-devel@gnu.org; Sun, 28 Sep 2014 19:09:22 -0400 Original-Received: by mail-pd0-f176.google.com with SMTP id fp1so3097352pdb.21 for ; Sun, 28 Sep 2014 16:09:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:face:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=pBsyZy4FPC10WjkDjO+Fho3UtirxNDJwxFjRwiQ/Z9c=; b=roKm4dNU5KsUbbPWQQFBTytMQbC1yTj1DfYL1F7PkyEaCRLCTExUpgRPY8HH8os4Al smeBU4XXWckYXGb7a20JVFoJqo6as6hRo3IymkHC+Mb82C2a9TnKgMzmHtkUEGCY7X5y 1FTqUYuaFb6pnWnfyuYNV7CTMUB52GbmR0lBurGM08e14fd2K/oeVMfyTARPk/MmrIl9 10PsEKJq4v97RgWyyB6R1UjKB/noW2z0ThuIukaRTKIe2VajteBzlOiToplEXCZhzo+7 2nffhQzNaleRjOdUtB6WmirJngt4GJEVaVweFRyiGuNbdi7/MWQff2uOvZUPQ5m7DuuA kjbQ== X-Received: by 10.68.201.138 with SMTP id ka10mr56033211pbc.23.1411945756065; Sun, 28 Sep 2014 16:09:16 -0700 (PDT) Original-Received: from fortuna ([221.222.147.223]) by mx.google.com with ESMTPSA id rz8sm10541569pbc.63.2014.09.28.16.09.13 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sun, 28 Sep 2014 16:09:15 -0700 (PDT) Face: iVBORw0KGgoAAAANSUhEUgAAACgAAAAoBAMAAAB+0KVeAAAAGFBMVEUKDAg1NjRWV1V9fnyg op/DxcLk5uP8/voi63ReAAAACXBIWXMAAAWJAAAFiQFtaJ36AAAAB3RJTUUH1goZAgAz00bgXgAA AeVJREFUKM9lk0Fz2jAQhQXJD3CCO70CmcC1YMtcWyTZ14Bl69xats4N9r6/3zWQBlodNKNPu/s0 b1cCQFuZGpfVVh3vAvBJolIXRkapSuoRUtIdFyo1Y5xSdlAj7OtvD1XnXxmWRi+eWgcxyCed1lVV B1CrKyujMoi+eLA5kU1SsjoHlW+nQjTtFxk4MXgrOxvIqzoTZR8XgPaLl419zgsMaSGFPiUOZCIh thsx5Xy9NsK8Kwf/JoQgMxcVJ301HKkcSWaT0O7FY056J4U9xcYfnmVXG4801lW6lqwu2nKFZoHC HuzvaTVndZ+LaRQgZdthXw1cpynEkLEwyFHXk/aIxNQ6QeooJuzPMB+wn+D7JJNsiCcVA13/A3h/ xE9J+WidpAwoYNmRFwyvSRhNVtsdaAewzZZP5uw82QL9+tyNfocyP0McAzICUr5Mk9RdIjWasUNx aIIt6NK4ZtXIMdfMQt3nuMAyWbLI4DqZ4xPq/ag8jPond4XU/cLuOgw6XCFX/YCUfcDAMMH58fD4 G9kDchwfqVefkBwup2uZM+Q4WhJt5jN3AxXCsaS2yXEDuWgS8VOzW0gFjhEPmLyFMKBFaLb1HRwc DiaKwx0EeTMRYnYPQRW3PP4HApvlMv0PttX5v/D6Aws3IOSEwzmLAAAAAElFTkSuQmCC In-Reply-To: (Stefan Monnier's message of "Sun, 28 Sep 2014 12:41:00 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (CentOS 6.5) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174785 Archived-At: On 2014-09-28 12:41 -0400, Stefan Monnier wrote: > I mostly agree, but so far the cl-labels macro is not clever enough to > generate as efficient code as cl-flet*. I didn't realise this. > It would be good to improve cl-labels with some dependency analysis so > that it can generate just as good code as cl-flet*. I compare the expansions of these two forms and they look quite similar to me. What kind of inefficiency do you have in mind? (cl-labels ((oddp (x) ;; (evenp (1- x)) (and (integerp x) (not (zerop (/ x 2))))) (evenp (x) (cl-case x (0 t) (t (oddp (1- x)))))) (oddp 13)) (cl-flet* ((oddp (x) (and (integerp x) (not (zerop (/ x 2))))) (evenp (x) (cl-case x (0 t) (t (oddp (1- x)))))) (oddp 13)) Thanks, Leo