From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.help Subject: Re: Why is Elisp slow? Date: Tue, 7 May 2019 15:40:23 +0200 Message-ID: <20190507134023.kxilippv5vr7wjdv@Ergus> References: <443E6AB4-2478-4677-8A23-A0B04559E949@icloud.com> <84F2860D-523D-4F30-BD52-D6A915416167@icloud.com> <20190507104945.gfdrftaeztrzbkt6@Ergus> <44A389B2-9D9D-4C1F-B9E3-9859C77DAF70@icloud.com> <798C9A13-7A2F-4C43-A5D9-6FDE00D647FC@icloud.com> <07106E19-C81B-460A-A481-570C7902694D@icloud.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="209553"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: help-gnu-emacs@gnu.org, Stefan Monnier To: =?utf-8?B?7KGw7ISx67mI?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 07 15:40:50 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hO0Ku-000sMi-PU for geh-help-gnu-emacs@m.gmane.org; Tue, 07 May 2019 15:40:48 +0200 Original-Received: from localhost ([127.0.0.1]:47040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO0Kt-0003E6-Q9 for geh-help-gnu-emacs@m.gmane.org; Tue, 07 May 2019 09:40:47 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hO0Kf-0003Dm-4w for help-gnu-emacs@gnu.org; Tue, 07 May 2019 09:40:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hO0Ke-0002ae-32 for help-gnu-emacs@gnu.org; Tue, 07 May 2019 09:40:33 -0400 Original-Received: from sonic304-22.consmr.mail.ir2.yahoo.com ([77.238.179.147]:46545) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hO0Kd-0002W8-Ei for help-gnu-emacs@gnu.org; Tue, 07 May 2019 09:40:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1557236429; bh=SWvLQK5zKjuZNveTB75Efyyd68hHu5T5lG7n6ufxUpI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=Td76wENSQwpMKXt1wpPLmlDvpQWXD7/oVSBIbsrzfurWS8oaj/tvftGFE3VNlClg8KARS9VcuiyqwBqCpbIbNf+X6nwDMU0kPfCSXp/6LMP2GMVN9WVThDlAkqTY8tmncvamPBLTxy5ptO1/nJj3CJDfeM+gJxXZ46p/loTgBJLWfLietFQl4Q3q/ECgnhNul+1uzsSRb892FG4vuyU3DwHXhIwOZLoMy7yi/brq3jRxvLzEDw/MA+3fA+okMHAKrN+DBzIOznfmSiwoIXUEpICz0e5hNr/thXoOiSI62KJ3ApCO3g2Gk5LDJXPqyQaVEzJi2mBBO+tEpUrFSSlRyA== X-YMail-OSG: Tinjw0QVM1li2Mf7LyeyJWymrGE5h0FZkuuHA28l7rAUDw1SdQgxrdZPmqy5LR6 PxQEc9kHiLqDUU7FWast0sMQui0TaHCFwKLu9J3OYtk_FWOdF5u_AFLgMyQPFgpY2.igjEkuUXst ErWAQvV0d3TjPYDGQ6NNfrHQvlSlne7_mWyAYt_VQ._l89bDuYBNite.Hr6jCnTZ8HQcUtc_OVfx uNPpYFmms2HkJo3MCz7Fk3XcL.ELk6DERNeke8PhJ0KP_m_7l3bNWDPfT1TLy0mL2HQiSpNvySMo 1DWCJ52jDKWPzCknTIgY8bIBmk.nJDPoeR3R.bG9iK6h6kGaD_SKOHCEEeNIGnPeMoFEOMHizIEM aQx9onkR8hl7vhlLW4KeLjRClw.2.DIvNyz.Yg2SE3pLk4hfnuA5lSjdm05.RlZ1LGn3B9fjlixU Mn6GHBhbSo9PBwBRbMivmKzGPD2tRE8FZrZiGNu3FsB31rcb4jVj8d_zO6ctSxvAhVGoVfHrXlMj MIUPYJgOigtAvU9MAlHLYgyP8K8zjICzD5g13teTJcc5jogG3B8NSts3lv2FEMknAPrensNQ63IT 5cCDtFzzdAvoOx6tBUm42Cz37sx6m_yVn_r95ApE_yc8lmO.gZOCLR6VjS75SoXPXaqL4isidFI. obGtmDDiqFSb0juviGtsSVqfnn9UK2ngZYxI9pHoBjAvTGXUmjjKwd44SEYpeZUGDzVUg1Um9nYE gmRlHXLSDBOgpCFYiI5MJtsVVAJxAttqGlGYBHHQKh1g3pxo21XA_JNuZQWPaFwEcTMZi.QaxeaQ .nEN_kH58NQsp0MlGjFMhoODokdwmY6OBZaO2vqie_ Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Tue, 7 May 2019 13:40:29 +0000 Original-Received: from 2.152.205.184.dyn.user.ono.com (EHLO Ergus) ([2.152.205.184]) by smtp404.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 43384cc0a1f938e9eb271e6ad2d4b776; Tue, 07 May 2019 13:40:26 +0000 (UTC) Content-Disposition: inline In-Reply-To: <07106E19-C81B-460A-A481-570C7902694D@icloud.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 77.238.179.147 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:120257 Archived-At: On Tue, May 07, 2019 at 10:16:42PM +0900, ????????? wrote: Yes, it is not straight forward, but that's what makes it more interesting (and useful). I still think that provide a plugin for SBCL is the best to do it native and efficient, but I have zero knowledge about the SBCL infrastructure for that. But the idea of adding it some C bindings is not crazy. Specially because all the functions have the same signature. We just need some documentation about the internal data structure representations in SBCL. >Ahh??? I now understood what???s the problem. :-( > >> 2019. 5. 7. ?????? 10:04, Stefan Monnier ??????: >> >>>> Similarly, you'll need to rewrite all the functions/macros like CONSP, >>>> SYMBOLP, FIXNUMP, XCAR, XCDR, make_fixnum, ... Performance of those >>>> is important. >>> >>> Why would you not use the default CL???s defun, car, cdr, symbol-p, >>> cons-p, etc, etc? >> >> I'm talking the work needed to adapt Emacs's C code, e.g: >> >> DEFUN ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 0, 2, 0, >> doc: /* Return a window currently displaying BUFFER-OR-NAME, or nil if none. >> BUFFER-OR-NAME may be a buffer or a buffer name and defaults to >> the current buffer. >> >> The optional argument ALL-FRAMES specifies the frames to consider: >> >> - t means consider all windows on all existing frames. >> >> - `visible' means consider all windows on all visible frames. >> >> - 0 (the number zero) means consider all windows on all visible >> and iconified frames. >> >> - A frame means consider all windows on that frame only. >> >> Any other value of ALL-FRAMES means consider all windows on the >> selected frame and no others. */) >> (Lisp_Object buffer_or_name, Lisp_Object all_frames) >> { >> Lisp_Object buffer; >> >> if (NILP (buffer_or_name)) >> buffer = Fcurrent_buffer (); >> else >> buffer = Fget_buffer (buffer_or_name); >> >> if (BUFFERP (buffer)) >> return window_loop (GET_BUFFER_WINDOW, buffer, true, all_frames); >> else >> return Qnil; >> } >> >> >> -- Stefan >> > >