[MLton] Multicore CPU's and MLton

Wesley W. Terpstra wesley@terpstra.ca
Mon, 4 Jul 2005 12:43:58 +0200


On Sun, Jul 03, 2005 at 05:36:49PM -0400, Ray Racine wrote:
> - For web (and concurrent multiuser) based development native thread
> concurrency is essential for scalable applications. IMHO.

I completely disagree with this point.

> - It is yet a further shame that the Java threading model is based upon
> a mutex / critical section model, synchronized blocks, when much more
> sophisticated concurrent abstractions more along the lines of CML are
> easier to use and much less prone to deadlocks.

The best solution to deadlocks and lock-contention is to not have it.

Daniel C. Wang wrote:
> In the past MLton was on the same performance curve as all the single
> thread apps on the desktop. Now, if MLton can't exploit the concurrency,
> MLton is just going to be using available CPU resources less and less
> efficiently.

Are we talking about the compiler here? Or the compiled application?

I think MLton is just fine for developing extremely scaleable web services.
In fact, because continuations work so well at reimplementing state-threads,
I would wager that an MLton-based webservice would destroy anything you
compared it to, _especially_ on multi-processor machines.

As for MLton compiles being single-threaded, yeah, it sucks. However, MLton
compiles itself so quickly (~7min) on my machine, that it's not that big a
deal for me. The only time I get upset is when I need to do C-codegen!
(Since I have a powerbook, this is often)

-- 
Wesley W. Terpstra