From: Lynn Winebarger <owinebar@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: inline function expansion
Date: Mon, 8 May 2023 07:12:23 -0400 [thread overview]
Message-ID: <CAM=F=bD3kMjmG30cnHEsRSxeiQXO_ewfNg+PFFF8GzrTfGTEzw@mail.gmail.com> (raw)
In-Reply-To: <87ild34qre.fsf@dataswamp.org>
On Mon, May 8, 2023 at 12:15 AM Emanuel Berg <incal@dataswamp.org> wrote:
> >> Isn't the idea of inlining that the behaviour/effect of
> >> invoking a function shouldn't change, just that the
> >> resulting code might be more efficient?
> >
> > The main thing I am interested in is the ability to do
> > compile-time evaluation on constant expressions.
>
> What exactly are "constant expressions" in the context of
> this discussion?
>
> The same as this?
>
> https://www.stroustrup.com/sac10-constexpr.pdf
>
See https://www.gnu.org/software/emacs/manual/html_node/elisp/Inline-Functions.html#index-inline_002dconst_002dp
> > I'm trying to design/implement a way of defining generic
> > methods so that the specialization may be determined (or
> > explicitly constructed) at compile time and compiled to
> > a non-generic function call, and left to dynamic
> > dispatch otherwise.
>
> Okay, so what would be the gain(s) of having such
> a capability?
A structured way to write generic code without paying a substantial
run-time cost. Pretty much the same case as for define-inline, except
applied to generic methods.
Lynn
next prev parent reply other threads:[~2023-05-08 11:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-07 14:32 inline function expansion Lynn Winebarger
2023-05-07 17:51 ` Basile Starynkevitch
2023-05-07 19:48 ` Philip Kaludercic
2023-05-07 20:16 ` Lynn Winebarger
2023-05-08 0:21 ` Emanuel Berg
2023-05-08 11:12 ` Lynn Winebarger [this message]
2023-05-08 2:03 ` Lynn Winebarger
2023-05-11 7:11 ` Lynn Winebarger
2023-05-12 6:25 ` Emanuel Berg
2023-05-18 14:56 ` Lynn Winebarger
2023-05-19 13:31 ` Stefan Monnier
2023-05-20 14:18 ` Lynn Winebarger
2023-05-20 15:32 ` Stefan Monnier
2023-05-21 12:47 ` Lynn Winebarger
2023-05-18 18:29 ` Stefan Monnier
2023-05-19 0:22 ` Lynn Winebarger
2023-05-19 13:07 ` Stefan Monnier
2023-05-20 15:01 ` Lynn Winebarger
2023-05-20 15:48 ` Stefan Monnier
2023-05-27 14:34 ` Lynn Winebarger
2023-05-28 14:12 ` Lynn Winebarger
2023-05-28 14:57 ` Stefan Monnier
2023-05-28 22:42 ` Lynn Winebarger
2023-05-29 2:59 ` Stefan Monnier
2023-06-06 22:38 ` Lynn Winebarger
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAM=F=bD3kMjmG30cnHEsRSxeiQXO_ewfNg+PFFF8GzrTfGTEzw@mail.gmail.com' \
--to=owinebar@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.