From: Tom Lord <lord@regexps.com>
Cc: guile-devel@gnu.org
Subject: Re: Threads and asyncs
Date: Wed, 4 Sep 2002 19:38:02 -0700 (PDT) [thread overview]
Message-ID: <200209050238.TAA19359@morrowfield.regexps.com> (raw)
In-Reply-To: <02090420452627.19624@locke.free-expression.org> (message from Lynn Winebarger on Wed, 4 Sep 2002 20:45:26 -0500)
> The problem with this is that it requires really fast garbage collection.
Again -- I'll point at the substantial (from vague recollection: 20%?)
speedup SCM got from generationally collecting environments. The
common case pattern of how environments are used makes this a really
excellent choice.
There's also Stallman's ancient spaghetti-stack approach -- which is
kinda close to what SCM is doing.
You can view Guile's use of the C stack for eval as a way to trick the
C compiler into doing most of the most-common-case of
spaghetti-stacks. Then you can ask: is bending over backwards for
that trick *really* worth it? Screw-it: compilers for C-like
languages *aren't that hard* (in spite of the cultural machismo of the
GCC group).
> Guile's commitment to conservative collection can present a serious
> problem in this regard.
As with calling conventions, I think there is room for a two-level
approach. Precise GC in the core -- conservative GC for
"non-primitive foreign functions". In the very long term we can
talk the rest of the world into using some language other than C: in
which case the entire issue may very well simply disappear.
I'm not sure (aside from 1-3 year political reasons) why such care for
C should be so important. For example, 5 years ago or so, I wrote a
low-level buffer implementation and redisplay algorithm in Guile with
the result being smaller, simpler, more general code, compilable by
hobbit to produce acceptable performance on hardware that was (already
by that time) a bit behind the curve (thank Cygnus-cum-Red-Hat for its
non-release/stalled development). There is no performance critical
code in Emacs (for example) that couldn't be usefully rewritten in
Scheme.
And, again, I'm talking a little bit pie-in-the-sky. Should Guile
never undertake to change its core away from (for example)
conservative GC, if it converges on a nice API, then it is simply an
implementation optimized for that particular API. #f/() is the only
irreconcilable issue I know of in this regard. (Please, tb, spare us
a rehearsal of jimb's design -- we all either agree with me, know i'm
wrong, or already know the arguments. Ok, now, please say something
argumentive *anyway*.)
In Emacs-of-the-future, where the "market" for extensions heats up
quite a bit, I think conservative, incremental GC is essential to
robust operation.
> Now that I think about it [...]
you lost me with the rest of that, in case you want to clarify.
> Is all the thread hair in SCM as well?
Grr. We need a wiki to sort that out. No, I don't (recall that) it's
in SCM -- but then I also think Guile is dead-ending in this regard.
It's freekin hard. I tend to think of implementations in terms of
some data structures in the heap. You want those to be really fast.
Any kind of global locking makes them horribly slow. So, threads
_suck_ for Scheme.
But then on the other hand, it makes sense to put multiple CPUs on a
bus, sharing memory. So, what is the right abstraction to take
advantage of that? I keep coming back to the idea that, for multiple
Scheme threads, each thread gets its own separate universe -- no `eq?'
sharing at all.
But I want a wiki -- it's just intuitive speculation, at this point --
and the issues are large enough that one can easily wind up going in
circles out of shear confusion.
>> One language implementor I met made a big fuss over amdhal's law --
>> which has the implication for Guile that cleaning up various apis
>> (internal and external) should be a big priority.
> Ok, I give up, how do the two relate exactly?
Am I misunderstanding the referent of "the two"? amdhal's law talks
about the impact of optimizing components on the performance of a
system that incorporates those components. Clean APIs can enable
swappable components.
If the FFI/GC-interface don't overdetermine the implementation of
eval, gc, etc....then there's room to change strategies.
If the interfaces are _too_ general, then you can swap components, but
you can never implement the good ones in a reasonable way.
-t
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2002-09-05 2:38 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-02 20:52 Threads and asyncs Marius Vollmer
2002-09-02 21:24 ` Tom Lord
2002-09-02 21:53 ` Marius Vollmer
[not found] ` <87bs7ggiss.fsf@zagadka.ping.de>
2002-09-02 22:24 ` Tom Lord
2002-09-02 23:51 ` Marius Vollmer
2002-09-02 23:02 ` Rob Browning
2002-09-02 23:24 ` Tom Lord
2002-09-02 23:36 ` Tom Lord
2002-09-02 23:52 ` Lynn Winebarger
2002-09-03 0:57 ` Tom Lord
2002-09-03 1:13 ` Thomas Bushnell, BSG
2002-09-03 1:29 ` Tom Lord
2002-09-03 1:31 ` Tom Lord
2002-09-03 1:00 ` Thomas Bushnell, BSG
2002-09-03 1:28 ` Tom Lord
2002-09-03 1:23 ` RnRS process/history/documentation (was Re: Threads and asyncs) Lynn Winebarger
2002-09-03 1:27 ` Threads and asyncs Rob Browning
2002-09-03 1:45 ` Tom Lord
2002-09-03 1:48 ` Lynn Winebarger
2002-09-04 23:46 ` Lynn Winebarger
2002-09-05 0:20 ` Tom Lord
2002-09-05 1:45 ` Lynn Winebarger
2002-09-05 2:38 ` Tom Lord [this message]
2002-09-05 2:30 ` Thomas Bushnell, BSG
2002-09-05 2:43 ` Tom Lord
2002-09-05 2:40 ` Thomas Bushnell, BSG
2002-09-05 3:00 ` Tom Lord
2002-09-05 2:57 ` Thomas Bushnell, BSG
2002-09-05 3:23 ` Tom Lord
2002-09-05 3:14 ` Lynn Winebarger
2002-09-05 4:00 ` Tom Lord
2002-09-05 3:51 ` Thomas Bushnell, BSG
2002-09-05 4:01 ` Tom Lord
2002-09-05 22:03 ` Lynn Winebarger
2002-09-03 1:34 ` Thomas Bushnell, BSG
2002-09-03 18:06 ` Marius Vollmer
2002-09-04 0:28 ` NIIBE Yutaka
2002-09-04 18:02 ` Marius Vollmer
2002-09-04 22:30 ` NIIBE Yutaka
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=200209050238.TAA19359@morrowfield.regexps.com \
--to=lord@regexps.com \
--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).