GNU bug report logs - #70398
[PATCH 0/5] Reduce the size of gnu/packages/*.go files

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Mon, 15 Apr 2024 15:29:03 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Ricardo Wurmus <rekado <at> elephly.net>, Josselin Poiret <dev <at> jpoiret.xyz>, Mathieu Othacehe <othacehe <at> gnu.org>, Tobias Geerinckx-Rice <me <at> tobias.gr>, 70398 <at> debbugs.gnu.org, Christopher Baines <guix <at> cbaines.net>
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
Hi Ludo,

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




This bug report was last modified 1 year and 7 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.