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=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 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 26890BBAF for ; Wed, 15 Oct 2008 14:33:45 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As4BANt/9UhDWxLCbmdsb2JhbACBcpFtPq0lgWs X-IronPort-AV: E=Sophos;i="4.33,415,1220220000"; d="scan'208";a="16108973" Received: from ip67-91-18-194.z18-91-67.customer.algx.net (HELO server1.bertec.net) ([67.91.18.194]) by mail2-smtp-roc.national.inria.fr with ESMTP; 15 Oct 2008 14:33:44 +0200 Received: from kuba.bertec.net (kuba.bertec.net [192.168.2.16]) by server1.bertec.net (Postfix) with ESMTP id CD354105761 for ; Wed, 15 Oct 2008 08:33:42 -0400 (EDT) From: Kuba Ober To: caml-list@yquem.inria.fr Subject: Re: Re : [Caml-list] Re: Re : Road to native windows OCaml... Date: Wed, 15 Oct 2008 08:33:39 -0400 User-Agent: KMail/1.9.10 References: <200810131935.53365.kuba@mareimbrium.org> <200810141741.17372.kuba@mareimbrium.org> <599D22A112D94CC084EB04693A3846EF@countertenor> In-Reply-To: <599D22A112D94CC084EB04693A3846EF@countertenor> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810150833.41188.kuba@mareimbrium.org> X-Spam: no; 0.00; ocaml:01 cygwin:01 cygwin:01 ocaml:01 unices:01 mingw:01 bytecode:01 bytecode:01 mingw:01 computed:01 pointers:01 pointers:01 cheers:01 unix:01 unix:01 > > > Also, I don't think cygwin is bad. I just think it is not the > > > appropriate answer for most of us. > > > > Cygwin is an answer if you can't code natively. If you insist on > > using Unix mindset, then sure Cygwin is easiest. I don't see a problem > > with OCaml doing things the Windows way on Windows, and Unix way on > > Unices. > > Not quite clear what you mean by this - are you referring to the Cygwin > *port* of OCaml or the MinGW port *built* in Cygwin? (though I'm aware that > you don't have to use Cygwin to build this any more) What I mean is that if something is supposed to work on Windows, it better use Windows APIs to accomplish what it wants, and not a Unix-like environment provided by Cygwin. There may well be native ways to accomplish what Ocaml tries to accomplish using Unix APIs. > While it's not a major issue (especially once OCaml 3.11 comes along and > just about everything that can be done in bytecode is possible in native > code...), the bytecode interpreter in the MSVC port is considerably slower > than in the MinGW port (as documented in the readme) which is the reason I > chose it years ago over MSVC... I haven't looked in OCaml code: in absence of computed goto, you can use switch statements, function pointers or function-like objects (in C++). Some measurements show that function pointers are faster than switch statements (http://www.codeproject.com/KB/architecture/TimingVM.aspx). Cheers, Kuba