From: David McClain <dbm@refined-audiometrics.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] CML Discussion (was: Smart ways to implement worker threads)
Date: Thu, 15 Jul 2010 11:24:04 -0700 [thread overview]
Message-ID: <95DEE0F8-E751-4712-8C33-B7F74DA361C9@refined-audiometrics.com> (raw)
In-Reply-To: <AANLkTin6KxM9av6euRjj4_loQ76LtpuhmYTzEpbmLaPu@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1745 bytes --]
Hi,
> So which 10% of the Event module is poorly implemented? Or is it
> that the Event module doesn't have a spawn function and relies on
> the Thread module? Is it fixable (could a CML module be created for
> OCaml that faithfully implements the run-time described in Reppy's
> book)?
>
That 10% was a figure of speech. I cant know how much the missing
functionality affects the final application. Continuations are just
another way of stating "spaghetti stacks", since they represent the
entire "future" of the program -- i.e., the stacked contexts to be
returned to later.
My point was that OCaml's runtime is modeled against the use of a
single machine stack - hence the great speed. Spaghetti stacks
require explicit handling in the heap memory, and so would be slower.
But the great thing about spaghetti stacks is that a "continuation"
can be created as a first-class object, and easily reclaimed by the
GC. [Examples: CML, Smalltalk, Erlang, others?]
Technically, you can do anything in any language... so OCaml is
technically "fixable" in this regard. But is it practical? feasible?
I doubt it.
Whether the shortcomings are important to you depends on your
expectations and performance requirements. I have successfully used
the notion of Reppy Channels in OCaml, Lisp, Scheme, and elsewhere.
Only you can decide if the overhead of thread creation, the lack of
GC thread reclamation, and the act of throwing new threads at every
decision point, is too much, or inconsequential.
Dr. David McClain
Chief Technical Officer
Refined Audiometrics Laboratory
4391 N. Camino Ferreo
Tucson, AZ 85750
email: dbm@refined-audiometrics.com
phone: 1.520.390.3995
web: http://refined-audiometrics.com
[-- Attachment #2: Type: text/html, Size: 6076 bytes --]
prev parent reply other threads:[~2010-07-15 18:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-15 17:50 Rich Neswold
2010-07-15 18:24 ` David McClain [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=95DEE0F8-E751-4712-8C33-B7F74DA361C9@refined-audiometrics.com \
--to=dbm@refined-audiometrics.com \
--cc=caml-list@yquem.inria.fr \
/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