unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Bootstrap speed
@ 2022-01-02  5:44 Stefan Monnier
  2022-01-02  7:52 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2022-01-02  5:44 UTC (permalink / raw)
  To: emacs-devel

With the native compiler, I get the impression that the compilation from
`.el` to `.elc` files is faster but I also see that we spent an insane
amount of time in:

    ELC+ELN  emacs-lisp/macroexp.elc
    ELC+ELN  emacs-lisp/cconv.elc
    ELC+ELN  emacs-lisp/byte-opt.elc
    ELC+ELN  emacs-lisp/bytecomp.elc
    ELC+ELN  emacs-lisp/comp.elc
    ELC+ELN  emacs-lisp/comp-cstr.elc

right after the first dump.
I suspect this can be sped up significantly if we did something like:

    ELC  emacs-lisp/macroexp.elc
    ELC  emacs-lisp/cconv.elc
    ELC  emacs-lisp/byte-opt.elc
    ELC  emacs-lisp/bytecomp.elc
    ELC  emacs-lisp/comp.elc
    ELC  emacs-lisp/comp-cstr.elc
    ELN  emacs-lisp/macroexp.elc
    ELN  emacs-lisp/cconv.elc
    ELN  emacs-lisp/byte-opt.elc
    ELN  emacs-lisp/bytecomp.elc
    ELN  emacs-lisp/comp.elc
    ELN  emacs-lisp/comp-cstr.elc

Instead.


        Stefan




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

* Re: Bootstrap speed
  2022-01-02  5:44 Bootstrap speed Stefan Monnier
@ 2022-01-02  7:52 ` Eli Zaretskii
  2022-01-02 12:18   ` Óscar Fuentes
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2022-01-02  7:52 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Sun, 02 Jan 2022 00:44:33 -0500
> 
> With the native compiler, I get the impression that the compilation from
> `.el` to `.elc` files is faster but I also see that we spent an insane
> amount of time in:
> 
>     ELC+ELN  emacs-lisp/macroexp.elc
>     ELC+ELN  emacs-lisp/cconv.elc
>     ELC+ELN  emacs-lisp/byte-opt.elc
>     ELC+ELN  emacs-lisp/bytecomp.elc
>     ELC+ELN  emacs-lisp/comp.elc
>     ELC+ELN  emacs-lisp/comp-cstr.elc
> 
> right after the first dump.

Yes.  See bug#48921.  (comp.el is the worst offender in the above
group.)  Sadly, we didn't make any tangible progress in that matter
since the bug was filed.

> I suspect this can be sped up significantly if we did something like:
> 
>     ELC  emacs-lisp/macroexp.elc
>     ELC  emacs-lisp/cconv.elc
>     ELC  emacs-lisp/byte-opt.elc
>     ELC  emacs-lisp/bytecomp.elc
>     ELC  emacs-lisp/comp.elc
>     ELC  emacs-lisp/comp-cstr.elc
>     ELN  emacs-lisp/macroexp.elc
>     ELN  emacs-lisp/cconv.elc
>     ELN  emacs-lisp/byte-opt.elc
>     ELN  emacs-lisp/bytecomp.elc
>     ELN  emacs-lisp/comp.elc
>     ELN  emacs-lisp/comp-cstr.elc
> 
> Instead.

Please time that (including in parallel builds), maybe it's a good
speedup.  But note that this might require non-trivial changes to the
Makefile's, since the rules we currently use for native compilation
are kludgey workarounds due to the fact that we cannot easily explain
to Make when *.eln files need to be regenerated.



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

* Re: Bootstrap speed
  2022-01-02  7:52 ` Eli Zaretskii
@ 2022-01-02 12:18   ` Óscar Fuentes
  2022-01-02 14:25     ` Eli Zaretskii
  2022-01-02 19:30     ` Stefan Monnier
  0 siblings, 2 replies; 5+ messages in thread
From: Óscar Fuentes @ 2022-01-02 12:18 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Stefan Monnier <monnier@iro.umontreal.ca>
>> Date: Sun, 02 Jan 2022 00:44:33 -0500
>> 
>> With the native compiler, I get the impression that the compilation from
>> `.el` to `.elc` files is faster but I also see that we spent an insane
>> amount of time in:
>> 
>>     ELC+ELN  emacs-lisp/macroexp.elc
>>     ELC+ELN  emacs-lisp/cconv.elc
>>     ELC+ELN  emacs-lisp/byte-opt.elc
>>     ELC+ELN  emacs-lisp/bytecomp.elc
>>     ELC+ELN  emacs-lisp/comp.elc
>>     ELC+ELN  emacs-lisp/comp-cstr.elc
>> 
>> right after the first dump.
>
> Yes.  See bug#48921.  (comp.el is the worst offender in the above
> group.)  Sadly, we didn't make any tangible progress in that matter
> since the bug was filed.

Is it possible to profile libgccjit on those inputs? Also, searching gcc
bugzilla for "slow" or somesuch could be interesting.

The other-compiler-framework-which-shall-remain-unnamed is very slow on
certain cases (large functions, for instance.) Many algorithms are
slower than O(n) and it shows here and there. I'm pretty sure that GCC
suffers from the same.




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

* Re: Bootstrap speed
  2022-01-02 12:18   ` Óscar Fuentes
@ 2022-01-02 14:25     ` Eli Zaretskii
  2022-01-02 19:30     ` Stefan Monnier
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2022-01-02 14:25 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: emacs-devel

> From: Óscar Fuentes <ofv@wanadoo.es>
> Date: Sun, 02 Jan 2022 13:18:23 +0100
> 
> > Yes.  See bug#48921.  (comp.el is the worst offender in the above
> > group.)  Sadly, we didn't make any tangible progress in that matter
> > since the bug was filed.
> 
> Is it possible to profile libgccjit on those inputs?

I presented a profile in that bug report.  It doesn't look like
libgccjit is the culprit, it's our code that takes most of the time.
So it's squarely in our backyard.



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

* Re: Bootstrap speed
  2022-01-02 12:18   ` Óscar Fuentes
  2022-01-02 14:25     ` Eli Zaretskii
@ 2022-01-02 19:30     ` Stefan Monnier
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2022-01-02 19:30 UTC (permalink / raw)
  To: Óscar Fuentes; +Cc: emacs-devel

> Is it possible to profile libgccjit on those inputs? Also, searching gcc
> bugzilla for "slow" or somesuch could be interesting.

The problem is not in libgccjit:

If you touch those 6 files and re-build (i.e. you recompile those
files, but using a fully compiled Emacs for that), you'll see that it
takes a *lot* less time.


        Stefan




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

end of thread, other threads:[~2022-01-02 19:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-02  5:44 Bootstrap speed Stefan Monnier
2022-01-02  7:52 ` Eli Zaretskii
2022-01-02 12:18   ` Óscar Fuentes
2022-01-02 14:25     ` Eli Zaretskii
2022-01-02 19:30     ` Stefan Monnier

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).