unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Manuel Giraud <manuel@ledu-giraud.fr>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: [PATCH] Findirect_function
Date: Fri, 14 Jan 2022 17:48:31 +0100	[thread overview]
Message-ID: <87r19a9sbk.fsf@elite.giraud> (raw)
In-Reply-To: <jwvsftqnv0t.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 14 Jan 2022 11:27:30 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>    /* Optimize for no indirection.  */
>> -  if (SYMBOLP (fun) && !NILP (fun)
>> -      && (fun = XSYMBOL (fun)->u.s.function, SYMBOLP (fun)))
>> -    {
>> -      fun = indirect_function (fun);
>> -      if (NILP (fun))
>> -	/* Let funcall get the error.  */
>> -	fun = args[0];
>> -    }
>> +  fun = Findirect_function(fun, Qt);
>> +  if (NILP (fun))
>> +    /* Let funcall get the error.  */
>> +    fun = args[0];
>
> This should remove the corresponding comment.

You mean the /* Optimize… */ comment, right?

> And I think I'd only be willing to make such a change if it comes with
> some benchmarking showing that this optimization does not actually make
> a difference.

Do you happen to have some hints on how to do benchmarking in emacs? 😅
-- 
Manuel Giraud



  reply	other threads:[~2022-01-14 16:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 10:40 [PATCH] Findirect_function Manuel Giraud
2022-01-14 12:09 ` Mattias Engdegård
2022-01-14 13:00   ` Manuel Giraud
2022-01-14 12:16 ` Eli Zaretskii
2022-01-14 12:29 ` Andreas Schwab
2022-01-14 13:03   ` Manuel Giraud
2022-01-14 16:27 ` Stefan Monnier
2022-01-14 16:48   ` Manuel Giraud [this message]
2022-01-14 17:39     ` Stefan Monnier
2022-01-17 13:32       ` Manuel Giraud
2022-01-17 18:14         ` Stefan Monnier
2022-01-17 18:16         ` Stefan Monnier
2022-01-18  0:43           ` Po Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r19a9sbk.fsf@elite.giraud \
    --to=manuel@ledu-giraud.fr \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).