all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#44238: 28.0.50; [feature/native-comp] Build trampolines for FULL_AOT builds
@ 2020-10-26 12:20 Andrew Whatson
  2020-10-26 13:40 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Whatson @ 2020-10-26 12:20 UTC (permalink / raw)
  To: 44238

Hi Andrea,

In the spirit of pre-compiling as much as possible, would it make
sense to pre-compile all the trampolines when preparing a FULL_AOT
build?

Cheers,
Andrew





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44238: 28.0.50; [feature/native-comp] Build trampolines for FULL_AOT builds
  2020-10-26 12:20 bug#44238: 28.0.50; [feature/native-comp] Build trampolines for FULL_AOT builds Andrew Whatson
@ 2020-10-26 13:40 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-11-06 20:56   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 8+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-10-26 13:40 UTC (permalink / raw)
  To: Andrew Whatson; +Cc: 44238

Andrew Whatson <whatson@gmail.com> writes:

> Hi Andrea,
>
> In the spirit of pre-compiling as much as possible, would it make
> sense to pre-compile all the trampolines when preparing a FULL_AOT
> build?

Hi Andrew,

IMO is not worth compiling almost 1500 files for really using just a few
of them.  Also the compilation is realtivelly quick (~0.2s each on my
machine), I guess the most is GCC/GAS startup time.  Indeed this time is
payed only once when the primitive is redefined the first time.

That said if you want to experiment I think something like this should
do the job:

(mapatoms (λ (s)    
            (when (subr-primitive-p (symbol-function s))
              (comp-trampoline-compile s))))

Ciao!

  Andrea





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44238: 28.0.50; [feature/native-comp] Build trampolines for FULL_AOT builds
  2020-10-26 13:40 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-11-06 20:56   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-11-06 22:43     ` Andrew Whatson
  0 siblings, 1 reply; 8+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-11-06 20:56 UTC (permalink / raw)
  To: 44238; +Cc: whatson

Hi Andrew,

as I mentioned I think is really not worth, I'd be for closing
this. WDYT about?

  Andrea





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44238: 28.0.50; [feature/native-comp] Build trampolines for FULL_AOT builds
  2020-11-06 20:56   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-11-06 22:43     ` Andrew Whatson
  2020-11-06 22:53       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-08-27 17:24       ` Lars Ingebrigtsen
  0 siblings, 2 replies; 8+ messages in thread
From: Andrew Whatson @ 2020-11-06 22:43 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: 44238

Andrea Corallo <akrl@sdf.org> wrote:

> as I mentioned I think is really not worth, I'd be for closing
> this. WDYT about?

Sorry for the delay, I have been (slowly) working on a patch to build
the trampolines as part of a NATIVE_FULL_AOT build.  Adding a step to
the Makefile was easy, but all the trampolines end up in
~/.emacs.d/eln-cache instead of the build directory.  I'll invest some
more time over the weekend to get this working.

I understand that these are relatively cheap to build, but my
motivation is that when building binary packages for wider
distribution, any work ahead-of-time will pay off many times over.
I'd at least like to gather some data on the impact to build times and
package size from pre-building the trampolines before closing this
issue, if you don't strongly disagree.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44238: 28.0.50; [feature/native-comp] Build trampolines for FULL_AOT builds
  2020-11-06 22:43     ` Andrew Whatson
@ 2020-11-06 22:53       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-08-27 17:24       ` Lars Ingebrigtsen
  1 sibling, 0 replies; 8+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-11-06 22:53 UTC (permalink / raw)
  To: Andrew Whatson; +Cc: 44238

Andrew Whatson <whatson@gmail.com> writes:

> Andrea Corallo <akrl@sdf.org> wrote:
>
>> as I mentioned I think is really not worth, I'd be for closing
>> this. WDYT about?
>
> Sorry for the delay, I have been (slowly) working on a patch to build
> the trampolines as part of a NATIVE_FULL_AOT build.  Adding a step to
> the Makefile was easy, but all the trampolines end up in
> ~/.emacs.d/eln-cache instead of the build directory.  I'll invest some
> more time over the weekend to get this working.
>
> I understand that these are relatively cheap to build, but my
> motivation is that when building binary packages for wider
> distribution, any work ahead-of-time will pay off many times over.
> I'd at least like to gather some data on the impact to build times and
> package size from pre-building the trampolines before closing this
> issue, if you don't strongly disagree.

Sure take your time.

  Andrea





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44238: 28.0.50; [feature/native-comp] Build trampolines for FULL_AOT builds
  2020-11-06 22:43     ` Andrew Whatson
  2020-11-06 22:53       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-08-27 17:24       ` Lars Ingebrigtsen
  2021-08-29 21:23         ` Andrew Whatson
  1 sibling, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-27 17:24 UTC (permalink / raw)
  To: Andrew Whatson; +Cc: 44238, Andrea Corallo

Andrew Whatson <whatson@gmail.com> writes:

> Sorry for the delay, I have been (slowly) working on a patch to build
> the trampolines as part of a NATIVE_FULL_AOT build.  Adding a step to
> the Makefile was easy, but all the trampolines end up in
> ~/.emacs.d/eln-cache instead of the build directory.  I'll invest some
> more time over the weekend to get this working.
>
> I understand that these are relatively cheap to build, but my
> motivation is that when building binary packages for wider
> distribution, any work ahead-of-time will pay off many times over.
> I'd at least like to gather some data on the impact to build times and
> package size from pre-building the trampolines before closing this
> issue, if you don't strongly disagree.

This was half a year ago -- did you make any progress in this area?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44238: 28.0.50; [feature/native-comp] Build trampolines for FULL_AOT builds
  2021-08-27 17:24       ` Lars Ingebrigtsen
@ 2021-08-29 21:23         ` Andrew Whatson
  2021-08-29 21:26           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Whatson @ 2021-08-29 21:23 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 44238, Andrea Corallo

On Sat, 28 Aug 2021 at 03:24, Lars Ingebrigtsen <larsi@gnus.org> wrote:
>
> > Sorry for the delay, I have been (slowly) working on a patch to build
> > the trampolines as part of a NATIVE_FULL_AOT build.  Adding a step to
> > the Makefile was easy, but all the trampolines end up in
> > ~/.emacs.d/eln-cache instead of the build directory.  I'll invest some
> > more time over the weekend to get this working.
> >
> > I understand that these are relatively cheap to build, but my
> > motivation is that when building binary packages for wider
> > distribution, any work ahead-of-time will pay off many times over.
> > I'd at least like to gather some data on the impact to build times and
> > package size from pre-building the trampolines before closing this
> > issue, if you don't strongly disagree.
>
> This was half a year ago -- did you make any progress in this area?

After playing with it some more, I have to agree with Andrea that
pre-compiling trampolines seems not really worth it.  My reasonably
heavy emacs config needs only 37 trampolines, which take up 400K on
disk.  It's difficult to justify building ~1500 trampolines to ship
~15M of binaries which would never be used.

I also didn't come up with a satisfactory Makefile patch, so at this
point probably best to close the ticket.

Cheers,
Andrew





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#44238: 28.0.50; [feature/native-comp] Build trampolines for FULL_AOT builds
  2021-08-29 21:23         ` Andrew Whatson
@ 2021-08-29 21:26           ` Lars Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2021-08-29 21:26 UTC (permalink / raw)
  To: Andrew Whatson; +Cc: 44238, Andrea Corallo

Andrew Whatson <whatson@gmail.com> writes:

> After playing with it some more, I have to agree with Andrea that
> pre-compiling trampolines seems not really worth it.  My reasonably
> heavy emacs config needs only 37 trampolines, which take up 400K on
> disk.  It's difficult to justify building ~1500 trampolines to ship
> ~15M of binaries which would never be used.

Yup.

> I also didn't come up with a satisfactory Makefile patch, so at this
> point probably best to close the ticket.

OK; closing this report, then.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-08-29 21:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-26 12:20 bug#44238: 28.0.50; [feature/native-comp] Build trampolines for FULL_AOT builds Andrew Whatson
2020-10-26 13:40 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-06 20:56   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-06 22:43     ` Andrew Whatson
2020-11-06 22:53       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-27 17:24       ` Lars Ingebrigtsen
2021-08-29 21:23         ` Andrew Whatson
2021-08-29 21:26           ` Lars Ingebrigtsen

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.