From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Tadeus Prastowo Newsgroups: gmane.emacs.devel Subject: Re: Lexical binding: why? Date: Tue, 28 May 2019 14:01:27 +0200 Message-ID: References: <20190528100850.GA5296@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="224746"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 28 14:01:58 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 1hVanm-000w9U-JN for ged-emacs-devel@m.gmane.org; Tue, 28 May 2019 14:01:58 +0200 Original-Received: from localhost ([127.0.0.1]:33665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVanl-00069t-8p for ged-emacs-devel@m.gmane.org; Tue, 28 May 2019 08:01:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVanZ-00068d-Im for emacs-devel@gnu.org; Tue, 28 May 2019 08:01:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hVanY-0001Aq-G1 for emacs-devel@gnu.org; Tue, 28 May 2019 08:01:45 -0400 Original-Received: from mail-io1-xd2e.google.com ([2607:f8b0:4864:20::d2e]:46608) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hVanX-0001AV-SE for emacs-devel@gnu.org; Tue, 28 May 2019 08:01:44 -0400 Original-Received: by mail-io1-xd2e.google.com with SMTP id q21so15440880iog.13 for ; Tue, 28 May 2019 05:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unitn.it; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Yriz11q5FUzaBKpSUkRnPob5ra5f32gWbAsc5KzskDM=; b=OzcbY/BJFdgwylT8L0fIsH7NN6zqJwDAet//AbycVzOhZEFJSVrWSljEsODffjmbtp N4QfojMRL/OiE5ZqeuH6LWtOBBk+Y186M4qO/AKJLYbzkYt5m21l9hoHZTfnuHGLg+qC w0O9u0MWx4bciI+qf4MJySETckp2h0Oc1/Ouw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Yriz11q5FUzaBKpSUkRnPob5ra5f32gWbAsc5KzskDM=; b=W4puJJPbJr65hgisK87QUgmUt7F7gV7N70IUvvahzUZgkiWOt+cnu4yc2Zh/tm7bB8 a6iS4hVwppRdUkSGpek8sYWmHcrwgd5oPwstPTgQrYSqzVF3lkOB5G2pizLoBAwbdIIL Y+MqhHeBvf2k18f2wPJEqjvdvikRDFHfucg//fAUlhzdWrM8HgkAAwevNd0tJFWnnMl7 39bso3lE50CFMkAYzBqAUnCN+V0edg1ulq/p+ald8M0+zT8ZLEI9gvhKHWW2iP8SLAGi 3ALKpZerwLql16Nk56BK8TGaA39qoJssb4O+L95qAJXZG6+grKCaHX4YHTChux2fctMf 525w== X-Gm-Message-State: APjAAAVR2/69Protrwu83/sFAIA1LXl2zte+R5Xwnwty54LudNM6fyvs QShvM5sRdr+1lnqYq+KALBJ7xyauLw== X-Google-Smtp-Source: APXvYqxbQWJangH8iTOLAsDxqN/hPeZE0lq+8dBoCJzaZbrWF3HR33lxhTW4lGZeTFCFE2sED+qcFQ== X-Received: by 2002:a5d:9548:: with SMTP id a8mr40133565ios.54.1559044902789; Tue, 28 May 2019 05:01:42 -0700 (PDT) Original-Received: from mail-it1-f176.google.com (mail-it1-f176.google.com. [209.85.166.176]) by smtp.gmail.com with ESMTPSA id h23sm4386289ior.70.2019.05.28.05.01.42 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 28 May 2019 05:01:42 -0700 (PDT) Original-Received: by mail-it1-f176.google.com with SMTP id h11so3444079itf.5 for ; Tue, 28 May 2019 05:01:42 -0700 (PDT) X-Received: by 2002:a02:ce37:: with SMTP id v23mr10015138jar.2.1559044901918; Tue, 28 May 2019 05:01:41 -0700 (PDT) In-Reply-To: <20190528100850.GA5296@ACM> X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::d2e 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:237090 Archived-At: Hi Alan, On Tue, May 28, 2019 at 12:53 PM Alan Mackenzie wrote: > > Hello, Emacs. > > What is the purpose of converting Lisp files to use lexical binding? AFAIK, the primary objective is to allow a multi-threaded Emacs. > 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. Perhaps it is because a multi-threaded Emacs has not arrived yet? > Have I, perhaps, made some mistake somewhere? Does anybody else see > significant speed increases through the use of lexical binding? > > -- > Alan Mackenzie (Nuremberg, Germany). -- Best regards, Tadeus