guix-patches
[Top][All Lists]
Advanced

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

[bug#46100] [PATCH 0/4] Memoize inferior package access.


From: Ricardo Wurmus
Subject: [bug#46100] [PATCH 0/4] Memoize inferior package access.
Date: Tue, 26 Jan 2021 13:38:11 +0100
User-agent: mu4e 1.4.13; emacs 27.1

Ludovic Courtès <ludo@gnu.org> writes:

> Ludovic Courtès <ludo@gnu.org> skribis:
>
>> There’s a catch here: OUTPUT should be taken into account.
>>
>> Also it’s better to use eq?-ness but… I realized
>> ‘inferior-package-inputs’ & co. do not preserve eq?-ness.
>
> I think I went overboard here: given that <inferior-package> is a simple
> flat record type, using ‘equal?’/‘hash-ref’ is reasonable and that way
> we avoid the troubles of building an ID-to-package table.  All in all
> it’s slightly more efficient.

This looks good to me.

It is very similar to my first version (which I didn’t send to the
list), which also built a key consisting of the arguments to
inferior-package->manifest-entry — I wasn’t sure which of them was
important so I used them all instead of just consing package and
output.

I also like the use of define-syntax-rule to make it all look neater.


-- 
Ricardo





reply via email to

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