guix-patches
[Top][All Lists]
Advanced

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

[bug#70398] [PATCH 5/5] packages: Reduce code bloat due to list allocati


From: Simon Tournier
Subject: [bug#70398] [PATCH 5/5] packages: Reduce code bloat due to list allocation in input fields.
Date: Mon, 15 Apr 2024 19:56:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Hi Ludo,

On lun., 15 avril 2024 at 17:37, Ludovic Courtès <ludo@gnu.org> 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





reply via email to

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