I’m in the early stages of planning a deliverable binary product that will run on Linux, Mac and Windows.
My brief sniff of the air around the OCaml ecosystem says I should expect to target Cygwin to get Windows going (although there’s impressive work to get native Windows stuff done that can become the preferred approach in a few years).
My experience using Cygwin as an operating environment is that it’s pretty darn sluggish compared to Linux on the same computer.
Why is this? There’s an anecdote that says Cygwin can only
fork at about 30-50x a second on Windows, due to how it has to adapt it to work within Windows’ task spawning model. (For contrast, Linux can achieve thousands of forks per second if you play around with it).
I understand from another product developer that when they build binaries to deliver to Windows/Cygwin, they actually cross-compile on Linux because of how slowly the toolchain runs on Cygwin.
That sounds like bad news if you want to do UNIXy things, but for a single standalone application this might not be so bad? I assume if I ship a deliverable to Windows/Cygwin, the end user may enjoy good performance, so long as I’m not spawning tons of processes or relying on
fork for multi-programming. Is this a safe assumptions?
Any other gotchas when it comes to OCaml on Cygwin w.r.t. performance?
The app pretty much has real-time gaming requirements (though it’s not a game so can side-step worrying about access to GPUs and what-not). Stated another way, although my application will depend on the POSIX layer offered by Cygwin, I expect it not to crunch POSIX related stuff in the main loop.
How has your experience gone?