From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Davin Pearson Newsgroups: gmane.emacs.help Subject: Re: Optimising Elisp code Date: Thu, 4 Oct 2018 19:19:59 -0700 (PDT) Message-ID: <51bfb1a7-71e7-4b9b-8443-4dff9d159189@googlegroups.com> References: <638fb7dc-6fc5-4645-8793-97a00038a3a8@googlegroups.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1538705922 4224 195.159.176.226 (5 Oct 2018 02:18:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 5 Oct 2018 02:18:42 +0000 (UTC) Injection-Date: Fri, 05 Oct 2018 02:19:59 +0000 User-Agent: G2/1.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 05 04:18:38 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8FhM-0000y0-0p for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Oct 2018 04:18:36 +0200 Original-Received: from localhost ([::1]:60861 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8FjS-0000x5-9q for geh-help-gnu-emacs@m.gmane.org; Thu, 04 Oct 2018 22:20:46 -0400 X-Received: by 2002:a0c:ba13:: with SMTP id w19-v6mr2765654qvf.7.1538705999763; Thu, 04 Oct 2018 19:19:59 -0700 (PDT) X-Received: by 2002:a0c:b7a3:: with SMTP id l35-v6mr108536qve.4.1538705999649; Thu, 04 Oct 2018 19:19:59 -0700 (PDT) Original-Path: usenet.stanford.edu!m93-v6no127735qte.0!news-out.google.com!i36-v6ni2345qti.0!nntp.google.com!m93-v6no127733qte.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: <638fb7dc-6fc5-4645-8793-97a00038a3a8@googlegroups.com> Complaints-To: groups-abuse@google.com Original-Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=202.124.123.171; posting-account=SVVH0AoAAABplEQzMkIR3gU7a0gK8IuF Original-NNTP-Posting-Host: 202.124.123.171 Original-Xref: usenet.stanford.edu gnu.emacs.help:223994 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118119 Archived-At: On Friday, October 5, 2018 at 3:15:32 PM UTC+13, Davin Pearson wrote: > Suppose that you have a function: > > (defun foo () > (bar)) > > And bar is a function that has no side effects and returns 123 then calling > the function code-optimize (the name of my optimisation routine) > > M-x code-optimize on the function foo will result in the following defun > > (defun foo () > 123) Please could you admise me about whether or not such as function is part of Gnu Emacs or otherwise available as a third party tool. If not then my code will be reinventing the wheel :-(