From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Lexical binding: why? Date: Tue, 28 May 2019 10:08:50 +0000 Message-ID: <20190528100850.GA5296@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="176972"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 28 12:53:09 2019 Return-path: Envelope-to: ged-emacs-devel@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 1hVZjA-000jtT-Ew for ged-emacs-devel@m.gmane.org; Tue, 28 May 2019 12:53:08 +0200 Original-Received: from localhost ([127.0.0.1]:60735 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVZj9-0008Ib-Ct for ged-emacs-devel@m.gmane.org; Tue, 28 May 2019 06:53:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVZiv-0008HD-Cz for emacs-devel@gnu.org; Tue, 28 May 2019 06:52:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVZiu-0000nB-G8 for emacs-devel@gnu.org; Tue, 28 May 2019 06:52:53 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:54329 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1hVZ2N-0006Ft-L0 for emacs-devel@gnu.org; Tue, 28 May 2019 06:08:55 -0400 Original-Received: (qmail 76507 invoked by uid 3782); 28 May 2019 10:08:51 -0000 Original-Received: from acm.muc.de (p4FE15C8D.dip0.t-ipconnect.de [79.225.92.141]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 28 May 2019 12:08:50 +0200 Original-Received: (qmail 5377 invoked by uid 1000); 28 May 2019 10:08:50 -0000 Content-Disposition: inline X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:237081 Archived-At: Hello, Emacs. What is the purpose of converting Lisp files to use lexical binding? I always thought the idea was to speed the SW up. However, when I tried converting CC Mode to lexical binding, I got the following timings for two of my personal benchmarks: Dynamic binding Lexical binding Benchmark 1 7.249s 7.423s Benchmark 2 16.743s 16.691s . I thus see no speedup from the use of lexical binding. Have I, perhaps, made some mistake somewhere? Does anybody else see significant speed increases through the use of lexical binding? -- Alan Mackenzie (Nuremberg, Germany).