[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
- [bug#70398] [PATCH 0/5] Reduce the size of gnu/packages/*.go files, Ludovic Courtès, 2024/04/15
- [bug#70398] [PATCH 1/5] records: Do not inline throws for ABI mismatches., Ludovic Courtès, 2024/04/15
- [bug#70398] [PATCH 3/5] records: Do not inline the constructor., Ludovic Courtès, 2024/04/15
- [bug#70398] [PATCH 4/5] packages: ‘define-public’ replacement calls ‘module-export!’ directly., Ludovic Courtès, 2024/04/15
- [bug#70398] [PATCH 2/5] packages: Reduce bloat induced by ‘sanitize-inputs’., Ludovic Courtès, 2024/04/15
- [bug#70398] [PATCH 5/5] packages: Reduce code bloat due to list allocation in input fields., Ludovic Courtès, 2024/04/15
- [bug#70398] [PATCH 5/5] packages: Reduce code bloat due to list allocation in input fields.,
Simon Tournier <=
- [bug#70398] [PATCH 0/5] Reduce the size of gnu/packages/*.go files, Ludovic Courtès, 2024/04/15
- [bug#70398] [PATCH 0/5] Reduce the size of gnu/packages/*.go files, Ludovic Courtès, 2024/04/15
- [bug#70398] [PATCH 0/5] Reduce the size of gnu/packages/*.go files, Simon Tournier, 2024/04/15