unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Cc: guile-devel@gnu.org
Subject: Re: [Patch] Re-implement srfi-1 partition in C to avoid stack overflow
Date: Thu, 10 Jul 2003 09:11:30 +1000	[thread overview]
Message-ID: <87isqbqorh.fsf@zip.com.au> (raw)
In-Reply-To: <uw5vfv2vz3h.fsf@saturn.math.uni-magdeburg.de> (Matthias Koeppe's message of "Thu, 19 Jun 2003 17:58:10 +0200")

Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de> writes:
>
> The partition procedure in srfi-1 does not work well in Guile.  Even
> for not-very-long input lists (like 500 elements), a stack overflow is
> signaled.  The reason seems to be the recursive use of receive and
> values.

There a few unfortunate places like that.  I've been having a bit of a
go (not yet quite ready) at new alist-delete, alist-delete! and
alist-copy to that end too.

append-map looks like another, and count (the general case, not
count1) if I'm not mistaken.

> +   /* In this implementation, the output lists don't share memory with
> +      list, because it's probably not worth the effort. */

It might be nice to share everywhere it's permitted, if you could be
bothered.  (The non-tail recursion you're fixing is clearly the worst
problem though.)


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2003-07-09 23:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-19 15:58 [Patch] Re-implement srfi-1 partition in C to avoid stack overflow Matthias Koeppe
2003-07-09 23:11 ` Kevin Ryde [this message]
2003-07-10 13:59   ` Matthias Koeppe
2003-07-13 23:06 ` Kevin Ryde

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://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=87isqbqorh.fsf@zip.com.au \
    --to=user42@zip.com.au \
    --cc=guile-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.
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).