[PATCH] mpn/generic/perfsqr: Improve alternate (currently disabled) test.
David Sparks
sparks05 at proton.me
Tue Feb 17 00:39:20 CET 2026
On Monday, February 16th, 2026 at 16:27, marco.bodrato at tutanota.com <marco.bodrato at tutanota.com> wrote:
> Please consider the time that readers have to spend to read your patches.
You're absolutely right; I apologize.
By word of explanation, although not justification, I have a bunch of
local edits I've been splitting apart into commits, and as I worked
through that file I found a nice dividing line... but the second one
I should have just binned rather than appending to the e-mail.
Apologies.
> For example, consider the following lines from one of your proposed patches:
>
> diff --git a/tune/tuneup.c b/tune/tuneup.c
> index ed76f2cd9..8d822efc6 100644
> --- a/tune/tuneup.c
> +++ b/tune/tuneup.c
> @@ -726,11 +726,10 @@ one_method (int n, speed_function_t *functions,
> const struct param_t *param)
> {
> double *t;
> - int i;
> - int method;
> - int method_runner_up;
> + int i, method, method_runner_up;
>
> TMP_DECL;
>
> What's the need for this change? I spent time reading it, rereading it to check if there is some name change, read it for a third time to be sure that... there was no need at all.
>
> So, may I ask you not to mix cosmetic changes with algorithmic ones?
Absolutely; I had no intention to do so, but wasn't careful enough.
I messed with a few ways to do the runner-up logic, which used
different variables, before I ended up back where I started on the
variables, but didn't back out the accidental cosmetic change that
resulted from the declaration churn.
Although, honestly, I could use a *lot* of style guidance. There's
an unbelievable about of old stuff in the GMP source (GCC 1.x
compatibility macros? It's only been 34 years...), and I don't
know what's wanted and what's just cruft. I presume it's strictly
C89, with anything later (like <stdint.h>) conditional.
I happen to like being vertically dense, will happily put multiple
side effects on a line (a = b += c, for example) and prefer to
initialize at the declaration (int foo = <expr>), but I can happily
accommodate other preference *if I know about them*.
More information about the gmp-devel
mailing list