From: Ricardo Wurmus <rekado@elephly.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 46100@debbugs.gnu.org
Subject: [bug#46100] [PATCH 0/4] Memoize inferior package access.
Date: Tue, 26 Jan 2021 13:38:11 +0100 [thread overview]
Message-ID: <87y2gfj2ks.fsf@elephly.net> (raw)
In-Reply-To: <874kj40wbp.fsf_-_@gnu.org>
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
next prev parent reply other threads:[~2021-01-26 12:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-25 13:37 [bug#46101] [PATCH 1/4] guix: Fix typo Ricardo Wurmus
2021-01-25 13:37 ` [bug#46102] [PATCH 2/4] inferior: Memoize inferior-package->manifest-entry Ricardo Wurmus
2021-01-26 10:41 ` [bug#46100] [PATCH 0/4] Memoize inferior package access Ludovic Courtès
2021-01-26 11:30 ` Ludovic Courtès
2021-01-26 12:38 ` Ricardo Wurmus [this message]
2021-01-27 23:18 ` Ludovic Courtès
2021-01-28 11:53 ` Ricardo Wurmus
2021-01-28 13:16 ` bug#46100: " Ludovic Courtès
2021-01-25 13:37 ` [bug#46101] [PATCH 3/4] inferior: Memoize inferior package search path access Ricardo Wurmus
2021-01-25 13:37 ` [bug#46100] [PATCH 4/4] inferior: Memoize package input field access Ricardo Wurmus
-- strict thread matches above, loose matches on Subject: below --
2021-01-25 13:33 [bug#46100] [PATCH 0/4] Memoize inferior package access Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2gfj2ks.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=46100@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).