From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: emacs-devel@gnu.org
Subject: Re: [RFC] inline DEFUNs
Date: Wed, 04 Dec 2013 18:19:50 +0200 [thread overview]
Message-ID: <8361r44mhl.fsf@gnu.org> (raw)
In-Reply-To: <529EF98F.6050903@yandex.ru>
> Date: Wed, 04 Dec 2013 13:44:47 +0400
> From: Dmitry Antipov <dmantipov@yandex.ru>
>
> Recent discussion about dropping selected_window (started at
> http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg01090.html)
> raises an interesting question. In short, we want Fselected_window
> fast (read: inline in C) but still accessible from Lisp.
>
> Possible solution is to split DEFSUBR from DEFUN and use DEFINLINE in
> .h to define inline function, with matching DEFSUBR somewhere in .c.
> Attached patch converts Fcurrent_buffer to inline function. On my
> system, this effectively eliminates 63 calls to Fcurrent_buffer at the
> cost of increasing .text with just 48 bytes (for default '-O2 -g3' build).
> This feature also requires special support in make-docfile and Lisp code
> responsible to find and jump to a function definition.
Perhaps I don't understand some subtlety here, but the usual way of
dealing with this is to have an inline C function, which can then be
called from C, and have Fcurrent_buffer that calls that inline
function.
Am I missing something?
prev parent reply other threads:[~2013-12-04 16:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-04 9:44 [RFC] inline DEFUNs Dmitry Antipov
2013-12-04 16:19 ` Eli Zaretskii [this message]
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=8361r44mhl.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dmantipov@yandex.ru \
--cc=emacs-devel@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 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).