Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Road to native windows OCaml...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-10-15 (12:33)
From: Kuba Ober <kuba@m...>
Subject: Re: Re : [Caml-list] Re: Re : Road to native windows OCaml...
> > > 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 (

Cheers, Kuba