From: Alan Mackenzie <acm@muc.de>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: michael_heerdegen@web.de, Eli Zaretskii <eliz@gnu.org>,
emacs-devel@gnu.org, cpitclaudel@gmail.com,
monnier@IRO.UMontreal.CA
Subject: Re: scratch/accurate-warning-pos: Solid progress: the branch now bootstraps.
Date: Fri, 30 Nov 2018 22:02:18 +0000 [thread overview]
Message-ID: <20181130220218.GB16256@ACM> (raw)
In-Reply-To: <dc8f7fe0-b616-8264-60eb-59057a7b2df5@cs.ucla.edu>
Hello, Paul.
On Fri, Nov 30, 2018 at 12:14:59 -0800, Paul Eggert wrote:
> On 11/30/18 10:55 AM, Alan Mackenzie wrote:
> > There are no performance "issues". Emacs with this bug fix is minutely
> > slower than without it, not enough to matter.
> I'm afraid we'll have to disagree about that. It's not worth slowing all
> Emacs computations by 3.5% - 10% or whatever, merely to get
> more-accurate locations in byte-compiler diagnostics.
Please stop being so disparaging. There's nothing "mere" about accurate
compiler messages, and the current bug fix delivers CORRECT locations,
not "more-accurate" ones.
> That is a significant slowdown, ....
No it isn't. We could sit you down in front of each version of Emacs,
get you to play with them, and you would be unable to distinguish them
without using a machine to do timings.
> .... and it's too much of a price to pay for such a small benefit.
You think having compiler messages whose locations simulate a random
number generator is acceptable? Remember, in a bootstrap, only 25% of
these locations are correct. People notice, and it makes us maintainers
look incompetent and stupid.
> I too have played with the idea to redefine eq, for a different purpose
> (so that bignums behave more like fixnums), and I gave it up because of
> similar slowdowns. It wasn't worth the cost there either.
No doubt, you found some alternative.
What you're saying is that being fast is more important than working
properly. Taking that attitude to extremes, Emacs could be considerably
speeded up by removing some safety and sanity checks.
> Sometimes ideas just don't work out.
You're not willing to work on an alternative, though. You weren't even
in on the conversation when we were discussing alternatives (or, more
precisely, the lack of alternatives).
> > The point of the exercise is specific, not vague as you have
> > misformulated it. It is to print the correct source locations in
> > compiler warnings which are currently being output as wrong locations.
> > For example, read bug #9109.
> Bug #9109 could be fixed by a read variant that returns
> symbols-with-positions, by changing the byte-compiler to understand
> the output of this read variant, and by having the byte compiler
> remove position information before passing a subexpression to a macro.
That wouldn't work. Macro expansion is done at an early stage of
compilation. You can't remove arbitrary position information and still
expect to get accurate (or indeed any) positions in compiler messages.
> It could also be fixed by a read variant that returns
> conses-with-positions.
Only by rewriting the compiler such that that information is somehow
preserved as compilation progresses. As long as you don't have any
macros which massage the code, that is.
> Neither fix would slow down ordinary code.
These were all considered earlier on, and dismissed as impractical or
non-working.
> However, as I understand it, we don't want either fix because these
> fixes would still generate subpar locations in diagnostics when
> byte-compiling other code that calls macros.
If by "subpar" you mean no location at all (beyond, perhaps, the name of
the top-level function), then subpar describes it well. And you're
talking about most code, typical code, here. What proportion of defuns
doesn't contain a `when'? Even `defun' itself is a macro. ;-(
> This is why I have been thinking about other code errors that involve
> macros, errors that you say are out of scope.
They are out of scope, yes. Expanding the scope into vague abstract
territory is an excellent way of postponing a solution for ever.
> When trying to consider alternatives to scratch/accurate-warning-pos, I
> was trying to get an understanding of problem scope that is independent
> of the proposed solution. Unfortunately I failed to do that, and this
> makes it difficult to consider alternatives.
Eli, Stefan and I had a wide ranging discussion about the possibilities.
If there had been alternatives, likely we would have stumbled across
them. Maybe we missed something. Feel free to take up that other
thread again if you've got anything to add.
But at the moment, scratch/accurate-warning-pos is looking like the only
pracaticable solution to these many bugs. It is a bad solution, yes,
but there are no good ones, and it is the least bad from what's
available.
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2018-11-30 22:02 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-17 12:45 scratch/accurate-warning-pos: First tentative successes Alan Mackenzie
2018-11-17 13:13 ` Eli Zaretskii
2018-11-23 13:09 ` scratch/accurate-warning-pos: Solid progress: the branch now bootstraps Alan Mackenzie
2018-11-25 11:26 ` Charles A. Roelli
2018-11-25 14:31 ` Alan Mackenzie
2018-11-25 15:12 ` Andreas Schwab
2018-11-25 15:42 ` Alan Mackenzie
2018-11-25 16:40 ` Eli Zaretskii
2018-11-25 17:59 ` Alan Mackenzie
2018-11-25 18:15 ` Eli Zaretskii
2018-11-25 18:23 ` Alan Mackenzie
2018-11-25 19:36 ` Alan Mackenzie
2018-11-25 16:22 ` Stefan Monnier
2018-11-25 17:35 ` Alan Mackenzie
2018-11-25 18:22 ` Stefan Monnier
2018-11-25 19:54 ` Alan Mackenzie
2018-11-25 20:08 ` Stefan Monnier
2018-11-26 9:52 ` Alan Mackenzie
2018-11-26 10:16 ` Alan Mackenzie
2018-11-25 16:38 ` Eli Zaretskii
2018-11-25 17:27 ` Andreas Schwab
2018-11-25 17:31 ` Alan Mackenzie
2018-11-25 17:39 ` Eli Zaretskii
2018-11-25 18:08 ` Alan Mackenzie
2018-11-25 18:45 ` Paul Eggert
2018-11-25 19:30 ` Alan Mackenzie
2018-11-25 20:12 ` Paul Eggert
2018-11-25 21:29 ` Alan Mackenzie
2018-11-26 1:41 ` Paul Eggert
2018-11-26 3:41 ` Eli Zaretskii
2018-11-26 17:43 ` Paul Eggert
2018-11-26 18:43 ` Alan Mackenzie
2018-11-26 19:18 ` Clément Pit-Claudel
2018-11-26 19:42 ` Alan Mackenzie
2018-11-27 1:07 ` Gemini Lasswell
2018-11-27 1:45 ` Alan Mackenzie
2018-11-27 6:06 ` Eli Zaretskii
2018-11-27 2:48 ` Paul Eggert
2018-11-27 7:43 ` Alan Mackenzie
2018-11-27 20:27 ` Paul Eggert
2018-11-27 21:15 ` Alan Mackenzie
2018-11-27 21:37 ` Paul Eggert
2018-11-27 21:53 ` Alan Mackenzie
2018-11-28 1:11 ` Paul Eggert
2018-11-28 12:04 ` Alan Mackenzie
2018-11-29 21:28 ` Paul Eggert
2018-11-29 22:05 ` Alan Mackenzie
2018-11-30 17:50 ` Paul Eggert
2018-11-30 18:55 ` Alan Mackenzie
2018-11-30 20:14 ` Paul Eggert
2018-11-30 22:02 ` Alan Mackenzie [this message]
2018-11-30 23:46 ` Paul Eggert
2018-12-01 7:35 ` martin rudalics
2018-12-01 8:25 ` Eli Zaretskii
2018-12-01 11:08 ` Alan Mackenzie
2018-12-01 11:36 ` Eli Zaretskii
2018-12-01 12:47 ` Alan Mackenzie
2018-12-01 14:09 ` martin rudalics
2018-12-01 14:30 ` Stefan Monnier
2018-12-01 16:30 ` martin rudalics
2018-12-01 19:56 ` Stefan Monnier
2018-12-01 14:59 ` Eli Zaretskii
2018-12-01 16:31 ` martin rudalics
2018-12-01 16:53 ` Eli Zaretskii
2018-12-01 19:04 ` martin rudalics
2018-12-01 19:22 ` Eli Zaretskii
2018-12-01 17:21 ` Alan Mackenzie
2018-12-01 17:44 ` Michael Heerdegen
2018-12-01 18:58 ` Alan Mackenzie
2018-12-01 20:26 ` Alan Mackenzie
2018-12-01 17:48 ` Eli Zaretskii
2018-12-01 21:00 ` Paul Eggert
2018-12-01 17:50 ` Clément Pit-Claudel
2018-12-01 18:26 ` Yuri Khan
2018-12-01 19:15 ` Clément Pit-Claudel
2018-12-01 21:26 ` Paul Eggert
2018-12-02 6:48 ` Yuri Khan
2018-12-02 18:39 ` Gemini Lasswell
2018-12-03 2:28 ` Stefan Monnier
2018-12-01 19:04 ` martin rudalics
2018-12-02 22:53 ` Dmitry Gutov
2018-12-01 0:26 ` Gemini Lasswell
2018-12-01 11:48 ` Alan Mackenzie
2018-11-27 22:09 ` Stefan Monnier
2018-11-28 2:18 ` Paul Eggert
2018-11-28 2:43 ` Stefan Monnier
2018-11-28 5:13 ` Paul Eggert
2018-11-28 6:03 ` Gemini Lasswell
2018-11-28 5:39 ` Gemini Lasswell
2018-11-28 13:06 ` Stefan Monnier
2018-11-28 6:28 ` Eli Zaretskii
2018-11-28 22:50 ` Paul Eggert
2018-11-29 7:19 ` Eli Zaretskii
2018-11-29 10:54 ` Alan Mackenzie
2018-11-29 11:13 ` Eli Zaretskii
2018-11-29 11:37 ` Alan Mackenzie
2018-11-29 21:12 ` Paul Eggert
2018-11-29 21:28 ` Alan Mackenzie
2018-11-28 0:53 ` Gemini Lasswell
2018-11-26 20:04 ` Stefan Monnier
2018-11-27 2:51 ` Paul Eggert
2018-11-26 9:48 ` Alan Mackenzie
2018-11-26 18:27 ` Paul Eggert
2018-11-25 18:48 ` Gemini Lasswell
2018-11-25 20:02 ` Stefan Monnier
2018-11-26 12:39 ` Alan Mackenzie
2018-11-26 16:14 ` Gemini Lasswell
2018-11-26 17:06 ` Alan Mackenzie
2018-11-26 17:24 ` Alan Mackenzie
2018-11-29 12:26 ` scratch/accurate-warning-pos: Some real world timings Alan Mackenzie
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=20181130220218.GB16256@ACM \
--to=acm@muc.de \
--cc=cpitclaudel@gmail.com \
--cc=eggert@cs.ucla.edu \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=michael_heerdegen@web.de \
--cc=monnier@IRO.UMontreal.CA \
/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.