Browse thread
JIT & HLVM, LLVM
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2009-09-30 (13:42) |
From: | Stéphane Glondu <steph@g...> |
Subject: | Re: [Caml-list] JIT & HLVM, LLVM |
Mikkel Fahnøe Jørgensen a écrit : > But this requires the function to be designed in a clean way and > conform to certain monadic rules, and getting it wrong creates a mess > in the type errors. Actually, I find the typing discipline enforced by the monadic abstraction very helpful (and elegant). > Now, we might as well just push a closure onto a queue instead of on > the call stack. This avoid a lot of complexity in the function type > design, and we get a lot more flexibility in how we dispatch the tasks > (arguably we could do the same or possibly more, in continuation > passing style, but it will give you a headache). This sounds like a narrow (and C-ish) way to tackle things. The bind operator is about composition of threads, not scheduling. > More importantly, it is much simpler to understand a closure on a > queue, than continuation passing style. What you call the "call stack" is orthogonal to your "queues of closures": one is about combining results of threaded computations whereas the other is just spawning threads and relying on some external mechanism to schedule them. In other words, I think both can be used together, and achieve different purposes. Best regards, -- Stéphane