From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 76B67BBAF for ; Sun, 20 Dec 2009 17:12:47 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhwCAGLbLUvU436rkWdsb2JhbACBSpoIAQEBAQkLCgcTA7VpAoQsBA X-IronPort-AV: E=Sophos;i="4.47,427,1257116400"; d="scan'208";a="40323674" Received: from moutng.kundenserver.de ([212.227.126.171]) by mail3-smtp-sop.national.inria.fr with ESMTP; 20 Dec 2009 17:12:47 +0100 Received: from office1.lan.sumadev.de (dslb-084-059-079-108.pools.arcor-ip.net [84.59.79.108]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MARiQ-1NAs474AwM-00BlGT; Sun, 20 Dec 2009 17:12:46 +0100 Received: from [192.168.0.32] (dslb-084-058-048-057.pools.arcor-ip.net [84.58.48.57]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id A3467C0E8E; Sun, 20 Dec 2009 17:12:45 +0100 (CET) Subject: Re: [Caml-list] OCaml is broken From: Gerd Stolpmann To: Erik Rigtorp Cc: caml-list In-Reply-To: References: Content-Type: text/plain Date: Sun, 20 Dec 2009 17:18:26 +0100 Message-Id: <1261325906.6545.39.camel@flake.lan.gerd-stolpmann.de> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX19hhDVV/ZTTIImfY5ZVNWQ8gYnybPJdy54YtmT 84eHiuPk2ngDaOlIfgcTpVCov5t1aaduYfQg0Ir3TSXobvmGZD e+TLAT7fRxij/Yw1GA2Tw== X-Spam: no; 0.00; ocaml:01 gerd:01 stolpmann:01 gerd:01 erlang:01 ocaml:01 bug:01 runtimes:01 runtimes:01 minimized:01 parallelism:01 minimized:01 parallelism:01 partitioned:01 stolpmann:01 Am Samstag, den 19.12.2009, 10:30 +0100 schrieb Erik Rigtorp: > Hi! > > I've been using Erlang and C++ to build a soft real-time system. As > the project has evolved we've needed to write more and more of the > code in C++ in order to achieve our latency requirements. But C++ is > not as performant as you might think until you start to write your own > allocators and cache aligning mallocs and datastructures. I've never > liked C++ so I decided to try OCaml and built a simple 100 line > program to build order books for Nasdaq. Turns out OCaml has really > competitive performance while being a really nice language. > > However OCaml is broken! It does not provide any support for multicore > architectures, which by now is considered a bug! It doesn't even allow > me to load multiple runtimes into one C program. > > Please fix OCaml! The first step would be to support multiple runtimes > running in the same process communicating using message queues. As you mention order books and soft-realtime, I guess your main concern are minimized latencies. Well, you need then a style of parallelism that focuses on a certain processing path for a single data item, and where the latency is minimized by using several cores. I think ocaml is unsuited for this type of task, but please don't call ocaml "broken" because of this. Other types of parallelism can be well supported, especially when you can accept multi-processing, and when you focus on larger processing paths and partitioned data sets. Gerd -- ------------------------------------------------------------ Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Phone: +49-6151-153855 Fax: +49-6151-997714 ------------------------------------------------------------