From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?7KGw7ISx67mI?= Newsgroups: gmane.emacs.help Subject: Re: Why is Elisp slow? Date: Tue, 7 May 2019 22:16:42 +0900 Message-ID: <07106E19-C81B-460A-A481-570C7902694D@icloud.com> References: <831BD780-F954-4E23-BF31-ED4E135C919B@icloud.com> <20190506125848.okei2qrib7m5p3vx@Ergus> <20190506161757.wg4wy3vr7emxnciv@Ergus> <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> Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="104567"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Ergus , help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 07 15:18:23 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 1hNzzD-000R6K-2W for geh-help-gnu-emacs@m.gmane.org; Tue, 07 May 2019 15:18:23 +0200 Original-Received: from localhost ([127.0.0.1]:46704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNzzC-0002K2-2b for geh-help-gnu-emacs@m.gmane.org; Tue, 07 May 2019 09:18:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNzyv-0002Jr-U9 for help-gnu-emacs@gnu.org; Tue, 07 May 2019 09:18:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNzyv-0002ge-0g for help-gnu-emacs@gnu.org; Tue, 07 May 2019 09:18:05 -0400 Original-Received: from pv50p00im-hyfv10011601.me.com ([17.58.6.43]:58971) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNzyu-0002gD-PM for help-gnu-emacs@gnu.org; Tue, 07 May 2019 09:18:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=04042017; t=1557235083; bh=aQ+hfu+3anFOLBxpIcrDB3q1yHDx3XhSBZfVbnut02w=; h=Content-Type:Mime-Version:Subject:From:Date:Message-Id:To; b=nlX/5R1y2YflnWB6J4t/HRAiJKs66/W13OE3uSHAof1nXIKJ2Sd5jiLnoMgmM6XBx LDdFrnU4ad0HyVXPtw7AnaqxuNdmvuIXHjHNw7edzOejjf0woCRSNsDxODY2WtPofQ SnbP4wO5zgRMDZGpzV50V3deG8yKvosMsFcNxepscrJ6mhgXOAGX4ydmvkB6JC+Jc+ Vp2H2UjQw3Esk9uWdyiOAHdRmAT6/tXorpadXpZ46KTZbpihF42IS9eQwZ0ZPEmVd3 yH36VATFAKQaMJ8ujEsWRfyTNnhmvWtqZMPqXa4aUAhEbX2vIZX7xgmtU6fQEKP6Hx 0ozipI4uAxuaw== Original-Received: from [10.56.218.59] (unknown [128.134.203.66]) by pv50p00im-hyfv10011601.me.com (Postfix) with ESMTPSA id 750A13805A8; Tue, 7 May 2019 13:18:02 +0000 (UTC) In-Reply-To: X-Mailer: Apple Mail (2.3445.9.1) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-05-07_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 mlxscore=0 mlxlogscore=511 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1812120000 definitions=main-1905070087 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 17.58.6.43 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:120256 Archived-At: Ahh=E2=80=A6 I now understood what=E2=80=99s the problem. :-( > 2019. 5. 7. =EC=98=A4=ED=9B=84 10:04, Stefan Monnier = =EC=9E=91=EC=84=B1: >=20 >>> Similarly, you'll need to rewrite all the functions/macros like = CONSP, >>> SYMBOLP, FIXNUMP, XCAR, XCDR, make_fixnum, ... Performance of those >>> is important. >>=20 >> Why would you not use the default CL=E2=80=99s defun, car, cdr, = symbol-p, >> cons-p, etc, etc? >=20 > I'm talking the work needed to adapt Emacs's C code, e.g: >=20 > 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. >=20 > The optional argument ALL-FRAMES specifies the frames to consider: >=20 > - t means consider all windows on all existing frames. >=20 > - `visible' means consider all windows on all visible frames. >=20 > - 0 (the number zero) means consider all windows on all visible > and iconified frames. >=20 > - A frame means consider all windows on that frame only. >=20 > 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; >=20 > if (NILP (buffer_or_name)) > buffer =3D Fcurrent_buffer (); > else > buffer =3D Fget_buffer (buffer_or_name); >=20 > if (BUFFERP (buffer)) > return window_loop (GET_BUFFER_WINDOW, buffer, true, = all_frames); > else > return Qnil; > } >=20 >=20 > -- Stefan >=20