From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.devel Subject: Re: Reliable after-change-functions (via: Using incremental parsing in Emacs) Date: Sat, 4 Apr 2020 16:38:49 +0100 Message-ID: References: <835zek1kpv.fsf@gnu.org> <83v9mkz5oo.fsf@gnu.org> <83pncsym6l.fsf@gnu.org> <4a9d6bb2-458d-89b0-5389-d1f883ef24a1@yandex.ru> <20200401135237.GA6240@ACM> <20200404110643.GB5329@ACM> <83eet3v6ev.fsf@gnu.org> <835zefuxc9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="60085"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Mackenzie , Eli Zaretskii , Dmitry Gutov , Andrea Corallo To: Emacs Development Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 04 17:39:58 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jKktp-000FWg-Mv for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Apr 2020 17:39:57 +0200 Original-Received: from localhost ([::1]:39672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKkto-000733-O1 for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Apr 2020 11:39:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46904) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKktC-0006YB-R4 for emacs-devel@gnu.org; Sat, 04 Apr 2020 11:39:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKktB-00058x-Pp for emacs-devel@gnu.org; Sat, 04 Apr 2020 11:39:18 -0400 Original-Received: from mail-oi1-x22d.google.com ([2607:f8b0:4864:20::22d]:42471) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jKktB-00058E-Lc; Sat, 04 Apr 2020 11:39:17 -0400 Original-Received: by mail-oi1-x22d.google.com with SMTP id e4so8984943oig.9; Sat, 04 Apr 2020 08:39:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=diXseSRX+t4yzECqcMVAnvyXYmNmoJuxura2/l8FuPs=; b=N/Vp0EBZLXIjYTeKaz4cwGsVbICd4SnIV0AL3/kGG9fL06ffJ/J2cd1dNn90lAMTk0 XsKyAJlQlC6BPFM45f+BsM7u76GPiMtz4P9Y2rkz1JtWYKpyiV4QlEBMcA60miPzu9iK 7ErVCfTsbxlE5kJbTwdVt2SzGVjYODoBkrl/LY/WEyvoGJCCwQSuLTg+b5mG2P1sRV3k DryYMZR5Kj77QrkNUjHLmzUPsQhJ+hxmB5eIOGVsVv3Qpi6KP2CEKRR7/5u0zRAV7KMq o9P/m3+DBrIsLSpDViUdq8dggtBsQtX1o42zoLDIZk30Uvgy48i22xG8FpvyEUsBtHsN aKNA== 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=diXseSRX+t4yzECqcMVAnvyXYmNmoJuxura2/l8FuPs=; b=siAr2qWLmMJZP06OqSJqNSK0hcO8vVCgrtLRBLqQygxsJvH5lO6GrQGyld5T1lD5M1 BbDwswegC3xZvl25DuRoCNWnFJiIHIe9klB6kKz4OLOlHhGIlvBwmoSYamU8fQQpGstU Hh2ydrR38LDQ3xdHTC6HJPzxxjpmwHbfWh08j6HZxtt/cBQV314kzyAc+uxM+EY+xzZI glSSrM+wvyJB94bKvw2qEbk6I6dQPb7BjKbRZyzkyMf2pdOWMo9EN4aLSkwyySBt7MU8 B+nbBrJoA2Sii3zVeTE687J5kE5wjNKYmQQjjgxd+4wXnmSnx2bHZEnllyaoy2j4cqUl 67LA== X-Gm-Message-State: AGi0PuYDL+bP6qJvMVM0DTxqUQqH49UiGfxhqnKYueSXqgryL3GIJBXX z7wdHBX827z+A8K6SdSDlmyQHSoGWHrxSEcm0GfxrEuTJ08= X-Google-Smtp-Source: APiQypJva6x7AuJlH9+78JhXsTtqefJoO5qIC0fXEXVNEirKOowKcjJ6TNIWTiEoE3+wsu1Fwq88y1gzxyfkIHPcAGg= X-Received: by 2002:aca:aa81:: with SMTP id t123mr7123512oie.117.1586014755846; Sat, 04 Apr 2020 08:39:15 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246408 Archived-At: Here, an -Og build takes about 2.5 times as long as an -O2 build to execute either of the two benchmarks. That's a relative decrease of 60% in elapsed time, for -O2 relative to -Og. I built Emacs in 4 separate clean worktrees of the master branch (f71afd600a). The build commands were identical except for the optimization flag. For each test I (twice) started "emacs -Q" and did either [1] or [2]: [1] M-: (benchmark 1 '(progn (find-file "src/xdisp.c"))) [2] M-: (benchmark 1 '(progn (find-file "src/xdisp.c") (sit-for 0))) The elapsed time reported was: without sit-for: -O0: 1.027754s, 1.031642s -Og: 1.295515s, 1.277441s -O1: 0.629743s, 0.629870s -O2: 0.513139s, 0.511230s with sit-for: -O0: 1.079090s, 1.068118s -Og: 1.347256s, 1.337780s -O1: 0.661679s, 0.664470s -O2: 0.533649s, 0.533949s (My only comment on the fact that -Og appears to be about 20% or 25% worse than -O0 is that it's not a typo.)