Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] cygwin performance
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: olczyk@i...
Subject: Re: [Caml-list] cygwin performance
On Sun, 20 Oct 2002 23:59:10 -0400, Oleg <oleg_inconnu@myrealbox.com>
wrote:

>Hi
>
>As I've never used O'Caml under Cygwin, I'm curious: are compiling and 
>linking with ocamlopt.opt as fast as they are under Linux? How about the 
>resulting programs?
>
>Thanks
>Oleg
Thank you for asking the question.
I've been meaning to rebut some stuff said about Windows,
so I'll tackle the question from the broader view of how does
C/C++ development compare on Windows vs Linux.

The question you ask AFAIK does not have an answer. The
reason is that gcc on Windows is known to be an inferior compiler.
So people are more concerned with Windows/MSVC++ ( what falls
under the rubric of Win32 here) vs Linux/gcc. ( Even so there is a
C/C++ compiler for Linux whose executables outperforms gcc by 10%. )

Win comparing Win32 code with Linux/gcc on a program which is
virtually identical on both platforms, one finds that there is a
measurable difference in efficiency, with the Win32 applications
coming out on top. ( Not surprising since the gcc/Windows version
produces poorer code than MSVC/Windows. ) 

Furthermore the cygwin API is poorly implemented and it's use is
likely to result in a performance hit. ( There was another UNIX
emulation system called something Stingray, Softray Stingsoft or
something like that, which was the preferred way to port software to
Windows. IIRC MS bought the company and then ( AFAIK ) killed
the product. )

I've worked on several projects porting from one platform to the other
( and adding features ), or writing software that is supposed to run
on both from scratch, and it is not that hard.

Furthermore there are several languages which work equally well on
both Posix and Win32. The scripting languages, Haskel, Erlang, Clean,
Squeak ( and other commercial implementations, but I'm focusing  more
on free implementations as they prove that people can do both without
getting paid ), and about half a million implementations of Scheme.
Many run better on Win32 than Linux.

After Sven Luthers initial respond to my email last week, I was
thinking that there would be an 80% chance that I would stick with
OCaml. Then came a bunch of rabid antiWindows responses. ( One even
suggesting that Haskell was an evil plot on the part of Microsoft. ) 

Being a professional programmer, and not some academic suckling off of
the French governments teats, or a student getting a check from Daddy,
I have to deal with Windows. For employment reasons the one
development computer that is on virtually 24/7 is a Windows machine.
It's natural that would be where I spend much of my off work
programming time on Windows. As most professional programmers do.

In one piece of irony I've been "told" by several people here that
ocamldebug is harder to write in Windows. About a year and a half ago
I met one of Borland's product managers working on Kylix. Since I was
very eager to find a C++ debugger that was better than gdb, I asked
whether they would be producing their own debugger. He told me that
because of certain Windows API's it was much easier to write a
debugger for Windows than for Linux. Nevertheless there is now a Kylix
debugger for Linux, and it runs much better than gdb.  Given that he
is a person who survives by his knowledge of PL and debuggers, and has
implemented debuggers on both OSes, I find his word highly credible.

Given that it is not difficult to develop for both platforms, it would
seem that most of those who claim that Windows development is
harder do so for two reasons: rabid antiMSism, and incompetence.
Which is sort of sad. Given the distaste for MS, it would be hard for
a Windows programmer to devote his spare time adding stuff to OCaml.
After all what would prevent people from ripping his contributions out
in the next version? ( Witness the camlp4 problems. ) Which is a shame
because Windows programmers would provide such a large pool of talent.

One final point about cygwin. The cmucl developers have decided that
if/when they do a port of cmucl to Windows. They would not use cygwin.
I think that says a lot.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners