From: "Ludovic Courtès" <ludo@gnu.org>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: 46100@debbugs.gnu.org
Subject: [bug#46100] [PATCH 0/4] Memoize inferior package access.
Date: Thu, 28 Jan 2021 00:18:08 +0100 [thread overview]
Message-ID: <87sg6mrmtr.fsf@gnu.org> (raw)
In-Reply-To: <87y2gfj2ks.fsf@elephly.net> (Ricardo Wurmus's message of "Tue, 26 Jan 2021 13:38:11 +0100")
Ricardo Wurmus <rekado@elephly.net> skribis:
> 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.
I pushed it as 0f20b3fa2050ba6e442e340a204516b9375cd231.
I wonder if the other patches improve the situation. If you run the
same test case with:
GUIX_PROFILING=memoization
what hit rates does it show for these spots?
Thanks,
Ludo’.
next prev parent reply other threads:[~2021-01-27 23:19 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
2021-01-27 23:18 ` Ludovic Courtès [this message]
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=87sg6mrmtr.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=46100@debbugs.gnu.org \
--cc=rekado@elephly.net \
/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).