Subject: [bug#70398] [PATCH 5/5] packages: Reduce code bloat due to list allocation in input fields.

From: Simon Tournier <[email-masked]>
Date: Mon, 15 Apr 2024 19:56:08 +0200

Hi Ludo,

On lun., 15 avril 2024 at 17:37, Ludovic Courtès <[email-masked]> wrote:

> +    ((_ (list args ...))
> +     ;; As of 3.0.9, (list ...) is open-coded, which can lead to a long list
> +     ;; of instructions.  To reduce code bloat in package modules where input
> +     ;; fields may create such lists, move list allocation to the callee.
> +     (add-input-labels args ...))

I am not sure to understand: « (list ...) is open-coded, which can lead
to a long list of instructions. ».  Well, irrelevant for .go size but
why not something like:

    ((_ (list args . rest))
      (apply add-inputs-labels (append args rest)))

It would not change for .go size but it would change for run-time if
it’s a long list, no?

Cheers,
simon