all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Caleb Ristvedt <caleb.ristvedt@cune.org>
Cc: guix-devel@gnu.org
Subject: Re: Latest guile-daemon changes and bewilderment
Date: Tue, 25 Jul 2017 16:05:03 -0400	[thread overview]
Message-ID: <877eywb7v4.fsf@netris.org> (raw)
In-Reply-To: <8760eicf4m.fsf@cune.org> (Caleb Ristvedt's message of "Mon, 24 Jul 2017 05:18:17 -0500")

Caleb Ristvedt <caleb.ristvedt@cune.org> writes:

> This includes reference-scanning, which I think pretty much works, but
> which I regret to say I spent too much time thinking about. Premature
> optimization and all that. It takes a rather different approach to the
> way the C++ code does it - it uses a trie to recognize references out of
> a list of possibilities (namely, anything thrown in the build
> environment's store). The idea is that additional pre-calculation can be
> performed on each node and it can become a sort of branching skip table
> of the sort used in that one string-matching algorithm whose name I
> can't remember.

Maybe you're thinking of the Boyer-Moore string search algorithm:

  https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm

You might also want to take a look at the simple algorithm I cooked up
to make grafting faster, in (guix build graft).  In theory it might be
improved by building some kind of lookup table based on the set of
expected hashes, as you suggest, but I wasn't sure if it would be a net
win, given the added code complexity and larger lookup tables.  We can
skip quite a lot simply based on the fact that Nix hashes include only
1/8 of the possible byte values, and exclude the most common letters
from English text.  More investigation is needed!

    Regards,
      Mark

      parent reply	other threads:[~2017-07-25 20:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24 10:18 Latest guile-daemon changes and bewilderment Caleb Ristvedt
2017-07-25  8:44 ` Ludovic Courtès
2017-07-28 11:19   ` Caleb Ristvedt
2017-08-01 12:46     ` Ludovic Courtès
2017-08-20  6:30     ` Ricardo Wurmus
2017-07-25 20:05 ` Mark H Weaver [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877eywb7v4.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=caleb.ristvedt@cune.org \
    --cc=guix-devel@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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.