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

From: Ricardo Wurmus <[email-masked]>
Date: Tue, 26 Jan 2021 13:38:11 +0100

Ludovic Courtès <[email-masked]> writes:

> Ludovic Courtès <[email-masked]> 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