From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Aaron Jensen Newsgroups: gmane.emacs.devel Subject: Re: macOS metal rendering engine in mac port Date: Sat, 29 May 2021 14:05:58 -0700 Message-ID: References: <83k0ni6pje.fsf@gnu.org> <83eedq6mvm.fsf@gnu.org> <83zgwd6gk3.fsf@gnu.org> <83bl8t5vu6.fsf@gnu.org> <83a6od5tqh.fsf@gnu.org> <834kel5qp3.fsf@gnu.org> <83zgwd489j.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37484"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Alan Third , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat May 29 23:07:11 2021 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 1ln6Ao-0009a4-7u for ged-emacs-devel@m.gmane-mx.org; Sat, 29 May 2021 23:07:10 +0200 Original-Received: from localhost ([::1]:56356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln6Am-0001lp-1j for ged-emacs-devel@m.gmane-mx.org; Sat, 29 May 2021 17:07:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln69u-00013i-A1 for emacs-devel@gnu.org; Sat, 29 May 2021 17:06:14 -0400 Original-Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:44803) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ln69s-0002jS-Hf; Sat, 29 May 2021 17:06:14 -0400 Original-Received: by mail-pl1-x635.google.com with SMTP id h12so3268537plf.11; Sat, 29 May 2021 14:06:11 -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=pORBHB9W459g4ASqBp0E61wP4sb6InPebP/wMDhhPPs=; b=bdgYOxtEs97cXhxNdwv+fgRQa4QQvS6BYccEtTkY+OCXUpDWjHMX1UaNqBSfUxJphM J5sGMUTq5WAxc46T0vHGir0P1PxgKs9+nxGx9+axvYeJlREIyYnVbmYgDQdXd5G7hgEn 2YXb457lhX7XiY9nJyrB69joSTV7/S5BK+Edl7XKP+W8A8l365jhLs+hftGxNzo9b4/P /PdWb07LHzTsyrZkOEUCbrD27/uSe5lamuukQRfebORPo0CgQQbFqngFXha007vxLMu0 p6sIH3CtNlPYc8LOAhRQvJuSd88KsxUVc3Nkc5GsUTfidYCNtyxY9FOa1BPe4jDk35Jc 23Uw== 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=pORBHB9W459g4ASqBp0E61wP4sb6InPebP/wMDhhPPs=; b=ASiZOqC8VJqvV+JrqnK/yir87bNiErzBPZ+CCunCUfu8yUweyN5SFAtfVQH7VVtRs+ n67s5a/7Hz3pBa90RHPPPN/VLLKIsXDonObkl3d1fp10dBuzNSlhzLEci4nsJ9cdnZWr ZRS0d354jXA9SacVpeeLQ9jh9+Es9U+aETZlGEiSNTzh65O11fCfkJENuTXIg8zJjiJ8 u/FJIp5BzH6w31WIdYuy80TH8Kp3vNKRUh5ouK7Cz0VgIzr0Kch8nuw41hGsNWTye7EX Hhn/qsNID4mhTsfk9QmEJzftU8zHaJh7/hIlto6MHpNRiQfEdlWPqPsuEpF4sOhRY4Yd SCTw== X-Gm-Message-State: AOAM533e/yH9cndw9rp4/2SlQ/uSPJfnaAqo0K3KSPfY+BDAR7P0ooie yBP+Drf3EwoF9qKKCWMlkhxin+voMWeOnzPsX3wQmUICZSg= X-Google-Smtp-Source: ABdhPJzLaag2GsB5Mi92YXLLCKDn+p/eRx9Z3E24Y9ZXILeQoFopbo1Aijoypj1k3MIiSI/u9dFIpiPVcofm3giyshA= X-Received: by 2002:a17:903:31c3:b029:ed:6f74:49c7 with SMTP id v3-20020a17090331c3b02900ed6f7449c7mr13697890ple.12.1622322369801; Sat, 29 May 2021 14:06:09 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=aaronjensen@gmail.com; helo=mail-pl1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:270099 Archived-At: On Sat, May 29, 2021 at 2:03 PM Aaron Jensen wrote: > > On Sat, May 29, 2021 at 1:03 PM Eli Zaretskii wrote: > > > > > From: Aaron Jensen > > > Date: Sat, 29 May 2021 12:30:49 -0700 > > > Cc: Alan Third , emacs-devel@gnu.org > > > > > > > OK, but still: assq_no_quit should be very fast. > > > > > > Sure, it's fast when you call it once, but it's not being called once. > > > It's being called enough times that it adds 10ms to every key press > > > when I have line numbers on and 1000+ faces. > > > > In a 64-bit optimized build, assq_no_quit's loop body is just 10 > > machine instructions. With 1200 faces, searching all of them once > > should take something like 500 nanoseconds, i.e. 0.5 microsecond. > > Does this match the times you see and the number of times the function > > is called? > > > > Also, please note that typing a single character redisplays just one > > line, the one where point is. That perhaps needs to merge 4 or 5 > > faces. So I'm not sure how come this could add 10ms to every > > keypress: you'd need 20,000 calls of assq_no_quit to account for 10ms. > > How come we call assq_no_quit 20k times when processing insertion of a > > single character? > > So with a single keypress I see: > > 6,000 lface_from_face_name_no_resolve > 19,000 assq_no_quit > > So yeah, that about accounts for 10ms If I'm quicker on the count, I see only about 9,000 assq_no_quit. Immediately thereafter another 10,000 or so go by, so maybe I can only attribute 9,000 w/ a keypress. There are only about 4,000 when line numbers are disabled using the same config. (all this is without the hash patch)