[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How does one find out what file a library has been loaded from?

From: Eli Zaretskii
Subject: Re: How does one find out what file a library has been loaded from?
Date: Tue, 19 Jul 2022 18:50:00 +0300

> Date: Tue, 19 Jul 2022 15:01:12 +0000
> Cc: emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
> > What do you like to find? whether it was loaded from cc-engine.elc or
> > cc-engine-XXXXXX.eln?
> Exactly that, yes.
> > If so, why does it matter?
> It matters a great deal.  There's the purely philosophical point that one
> should be able to control and understand ones own Emacs.

I didn't major in philosophy, so I cannot help you here, sorry.

> A further point is that Emacs should not deceive its users.

It doesn't.

> There's the point that if you're doing benchmark timings, the results are
> meaningless if you don't know what you're timing.

You are timing compiled Lisp code.  How exactly was it compiled
shouldn't matter _in_principle_, exactly as you don't have any easy
way of knowing what version of byte-compiler and byte-optimizer was
used to produce a .elc file -- and the differences can be significant.

If you do need to make this kind of distinctions, you have to use
"different means".  Like disassembly of the byte-code or looking if
cc-engine-XXXXXX.eln file is in your eln-cache, or using "C-h f" on
some function from cc-engine, where Emacs will tell you whether it's
byte-compiled ot natively-compiled (you can also use
subr-native-elisp-p directly if you want).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]