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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id F4119BBAF for ; Wed, 19 May 2010 18:48:25 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtgDAFqz80vZSMDdi2dsb2JhbACddRUBAQEIDQoHDwUfvliFEAQ X-IronPort-AV: E=Sophos;i="4.53,264,1272837600"; d="scan'208";a="51470676" Received: from fmmailgate01.web.de ([217.72.192.221]) by mail2-smtp-roc.national.inria.fr with ESMTP; 19 May 2010 18:48:25 +0200 Received: from smtp06.web.de ( [172.20.5.172]) by fmmailgate01.web.de (Postfix) with ESMTP id E084215A53E4F; Wed, 19 May 2010 18:48:10 +0200 (CEST) Received: from [78.43.204.177] (helo=frosties.localdomain) by smtp06.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #4) id 1OEmRG-00085H-00; Wed, 19 May 2010 18:48:10 +0200 Received: from mrvn by frosties.localdomain with local (Exim 4.71) (envelope-from ) id 1OEmRM-0005R5-6A; Wed, 19 May 2010 18:48:16 +0200 From: Goswin von Brederlow To: Eray Ozkural Cc: Michael Ekstrand , caml-list@inria.fr Subject: Re: [Caml-list] Re: about OcamIL References: <088201caf1ce$b5060cb0$1f122610$@com> <20100512151137.26894ywcpv71ixvk@imp.ovh.net> <012601caf351$e9a362e0$bcea28a0$@com> <44A730DD-54EB-4A1C-BD1A-6E9EFB31B5A2@x9c.fr> <01f001caf536$c923b4c0$5b6b1e40$@com> <20100517095327.14271x0lnao43sao@imp.ovh.net> <002001caf6e8$b408ed90$1c1ac8b0$@com> <20100519094634.63006zi1h04x95z4@imp.ovh.net> Date: Wed, 19 May 2010 18:48:16 +0200 In-Reply-To: (Eray Ozkural's message of "Wed, 19 May 2010 16:27:29 +0300") Message-ID: <87mxvvu9bj.fsf@frosties.localdomain> User-Agent: Gnus/5.110009 (No Gnus v0.9) XEmacs/21.4.22 (linux, no MULE) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: goswin-v-b@web.de X-Sender: goswin-v-b@web.de X-Provags-ID: V01U2FsdGVkX1/H4x22j9840Gl3DsILKcYphZmHyA5dxR3327PY ArCRDzbbUg+iwHQJBR/r19lycHEoYP8zUNFTSZE8twAp93m6lX p/apk/NDg= X-Spam: no; 0.00; eray:01 ozkural:01 ocaml:01 ocaml:01 speedup:01 compiler:01 stubs:01 mfg:98 garbage:01 garbage:01 imho:01 caml-list:01 writes:01 algorithm:01 asm:02 Eray Ozkural writes: > On the other hand, Jon's notion of high performance is valid I think. > You want to be as close to the metal as possible. Otherwise there is > no point in, say, writing a parallel version of the code. In the past > we thought that was only possible with C and Fortran. Nowadays we > think of C++ when we say that but I gladly find that ocaml is on par > with any of those for real world tasks, without requiring tedious and > cumbersome optimizations just to get it running (like in Java). The thing about ocaml is that it does not optimize. You get what you tell it to do. You put garbage in you get garbage out. You improve your algorithm you get a huge speedup. You don't get sudden and unexpected side effects that magically double your speed when you add a useless line of code somewhere because suddenly the compiler sees an optimization. Ocaml also finds a lot more bugs due to its stronger types and has much nicer look&feel for many problems imho. So you get your code written faster, looking better, working right and still have fun. If I finished writing a program (in basically any language) and find it runs too slow I have two avenues to optimize it: 1) Think of some algortihm that is more clever. That can easily improve performance by magnitudes. 2) Locate the part that sucks up all the time for no work being done and write some C/asm stubs that are specifically optimized. Except for extrem cases this tends to give little improvement. But that might be just me. MfG Goswin