From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=DNS_FROM_RFC_POST autolearn=disabled version=3.1.3 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 8E272BBC4 for ; Thu, 5 Mar 2009 07:22:29 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoMCAND+rknB/BcZk2dsb2JhbACVAAEBAQEJCQoJEQPCEoQIBg X-IronPort-AV: E=Sophos;i="4.38,305,1233529200"; d="scan'208";a="23883335" Received: from smtp22.orange.fr ([193.252.23.25]) by mail3-smtp-sop.national.inria.fr with ESMTP; 05 Mar 2009 07:22:28 +0100 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2202.orange.fr (SMTP Server) with ESMTP id 548561C00089; Thu, 5 Mar 2009 07:22:28 +0100 (CET) Received: from wwinf2209 (wwinf2209 [172.22.131.52]) by mwinf2202.orange.fr (SMTP Server) with ESMTP id 438651C00085; Thu, 5 Mar 2009 07:22:28 +0100 (CET) X-ME-UUID: 20090305062228276.438651C00085@mwinf2202.orange.fr From: yoann padioleau Reply-To: yoann padioleau To: Jon Harrop , caml-list@yquem.inria.fr Message-ID: <5001040.203359.1236234148184.JavaMail.www@wwinf2209> In-Reply-To: <200903050326.57931.jon@ffconsultancy.com> References: <91a2ba3e0903031340wcdc976cp52522eb35f7ccb73@mail.gmail.com> <200903050131.03494.jon@ffconsultancy.com> <49AF35B8.9030104@naughtydog.com> <200903050326.57931.jon@ffconsultancy.com> Subject: Re: [Caml-list] stl? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [98.212.173.155] X-Wum-Nature: EMAIL-NATURE X-WUM-FROM: |~| X-WUM-TO: |~||~| X-WUM-REPLYTO: |~| Date: Thu, 5 Mar 2009 07:22:28 +0100 (CET) X-Spam: no; 0.00; stl:01 higher-level:01 ocaml:01 haskell:01 ocaml:01 haskell:01 struct:01 bitfields:01 marshalling:01 compilation:01 2009:98 2009:98 wrote:01 wrote:01 caml-list:01 > On Thursday 05 March 2009 02:15:20 Pal-Kristian Engstad wrote: > > Jon Harrop wrote: > > > On Wednesday 04 March 2009 23:18:21 Pal-Kristian Engstad wrote: > > >> Sure -- those are probably not jobs that require performance, nor have > > >> resource constraints. > > > > > > I do not believe that C++ is significantly faster or better at handling > > > resources than higher-level languages. > > > > Have you ever tried to conform to a specific memory layout? We are often > > talking directly to hardware, and in those cases it is a prerequisite to > > be able to produce data that is in the exact format prescribed. Often > > these things are, put an 17-bit ID followed by a 3-bit CODE followed by > > a 12-bit LENGTH field, after which follows LENGTH items each of size > > that is some-function-of CODE. > > > > This is usually not a problem when a small part of your data needs to be > > described this way, but when a large portion of your data needs this > > formatting, you can see that OCaml or Haskell records simply doesn't > > work very well. > > I agree with the symptoms but not with C++ as the treatment. Granted you > cannot write such code directly in OCaml or Haskell but you can generate the > code using tools like LLVM Come on, can you stop all those stuff about LLVM. The guy works in a game company with people knowing C/C++ for decades, with quite a lot of legacy code I guess, and you arrive with your "hey you should use LLVM" that almost nobody knows about. Oh, and by the way, in which programming language is written LLVM ? :) Valgrind is written in C (and julien seward, its author knows very well Haskell), Qemu is written in C, because I guess indeed C struct and union and bitfields makes it easy to match directly to the hardware (no marshalling, there is direct mapping). > It doesn't need to be a JIT and, actually, HLVM already supports both JIT and > standalone compilation. So what you propose to his company is to switch from C++ to HLVM ? :) Be serious.