[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Time to merge scratch/correct-warning-pos into master, perhaps?
From: |
Stefan Monnier |
Subject: |
Re: Time to merge scratch/correct-warning-pos into master, perhaps? |
Date: |
Tue, 25 Jan 2022 14:26:31 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>> That's an oversimplification as well: it's only when we use the `NILP`
>> macro that the extra cost is avoided. Any use of `EQ` is still slowed
>> down when it happens to receive a nil as one of the arguments.
> I think, but I'm not quite sure, that a literal nil gets handled by
> BASE_EQ rather than EQ, or this might depend on it getting native
> compiled.
I don't think that's the case of C code that says
EQ (Qnil, ...)
maybe it is the case for ELisp code that says (eq nil ...) and which
gets native compiled. But I suspect it's a very small proportion of
the uses of EQ/eq, in any case.
Of course there shouldn't be very little code that says `EQ (Qnil, ...)`
because such code should use `NILP` instead (and *that* code indeed
doesn't suffer from the slowdown).
>> I do find the slowdowns discussed here rather worrisome.
>> I thought the original agreement was that it was OK to install this
>> change if the slowdown could be brought down to about 1% or below (for
>> the non-compilation case).
>> More importantly, I wonder how slowing down EQ by a factor of 2 can end
>> up costing 10% of runtime when running the test suite. I think this
>> deserves investigation.
> Maybe it's because a lot of the time spent by make check is spent in
> compilation, whether byte or native. Compilation _is_ slower, by quite
> a bit.
No, we are talking about the execution time:
Gregory Heytings wrote:
In short: byte-compilation is ~17.5% slower, execution is ~11%
slower. Nowhere near the "in the region of 1%" that was announced.
> When I ran elisp-benchmark on the before and after versions, the change
> was 2½% (on a native compiled Emacs).
So, something changes the cost from 2-3% to 11%. Maybe it's native
compilation (tho I don't know if Gregory ran these with native
compilation or not), or maybe it's somewhere in the nature of the code
in the test suite, or ...
Mind you, I consider 2½% to be already quite different from "about 1%",
but I think we should first focus on those 11% reports because I don't
think I'm willing to slow down all execution by 10% just to get better
position info in the compilation warnings.
Stefan
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, (continued)
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Gregory Heytings, 2022/01/23
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Eli Zaretskii, 2022/01/23
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Gregory Heytings, 2022/01/24
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Eli Zaretskii, 2022/01/24
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Gregory Heytings, 2022/01/24
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Eli Zaretskii, 2022/01/24
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Gregory Heytings, 2022/01/25
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Alan Mackenzie, 2022/01/25
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Stefan Monnier, 2022/01/25
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Alan Mackenzie, 2022/01/25
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?,
Stefan Monnier <=
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Alan Mackenzie, 2022/01/25
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Gregory Heytings, 2022/01/25
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Alan Mackenzie, 2022/01/26
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Gregory Heytings, 2022/01/26
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Alan Mackenzie, 2022/01/26
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Stefan Monnier, 2022/01/25
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Óscar Fuentes, 2022/01/25
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Po Lu, 2022/01/25
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, chad, 2022/01/26
- Re: Time to merge scratch/correct-warning-pos into master, perhaps?, Eli Zaretskii, 2022/01/26