From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Why is lexical binding so slow? Date: Tue, 26 Dec 2017 06:49:19 +0200 Message-ID: <83bmimhz5c.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1514263647 28723 195.159.176.226 (26 Dec 2017 04:47:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 26 Dec 2017 04:47:27 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 26 05:47:23 2017 Return-path: Envelope-to: ged-emacs-devel@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 1eTh95-0006tV-FI for ged-emacs-devel@m.gmane.org; Tue, 26 Dec 2017 05:47:19 +0100 Original-Received: from localhost ([::1]:51966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eThB4-0004El-5P for ged-emacs-devel@m.gmane.org; Mon, 25 Dec 2017 23:49:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eThAx-0004EG-0Q for emacs-devel@gnu.org; Mon, 25 Dec 2017 23:49:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eThAt-0003Vq-41 for emacs-devel@gnu.org; Mon, 25 Dec 2017 23:49:15 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eThAt-0003Vj-0N; Mon, 25 Dec 2017 23:49:11 -0500 Original-Received: from [176.228.60.248] (port=3188 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eThAs-0000gr-Dm; Mon, 25 Dec 2017 23:49:10 -0500 In-reply-to: (message from Philipp Stephani on Mon, 25 Dec 2017 21:20:23 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:221416 Archived-At: > From: Philipp Stephani > Date: Mon, 25 Dec 2017 21:20:23 +0000 > Cc: emacs-devel@gnu.org > > Stefan Monnier schrieb am So., 2. Juli 2017 um 20:36 Uhr: > > > https://github.com/mooz/js2-mode/issues/426#issuecomment-312506855. > > Why is that? > > Depends on specifics, so someone would have to investigate. > > I that case the reason was just a dumb mistake on my part: I ran the benchmark without byte-compiled files. > With byte compilation lexical binding becomes at least as fast as dynamic binding. If lexical binding is slow when run with uncompiled code, then our bootstrap is slower than it could be, because the first several dozen Lisp files are compiled and loaded with Emacs whose byte compiler and the rest of the Lisp code have not yet been byte-compiled.