Light weight concurrency in OCaml: continuations, monads, events, and friends
Résumé
We explore various ways to implement (very) light weight concurrency in OCaml, in both direct and indirect style, and compare them to system and VM threads approaches. Three simple examples allow us to examine both the coding style and the performances. The cost of context switching, thread creation and the memory footprint of a thread are compared. The trampolined style of programming seems to be the best both at CPU and memory demands.
Domaines
Langage de programmation [cs.PL]Origine | Fichiers produits par l'(les) auteur(s) |
---|
Loading...