prosseek
prosseek

Reputation: 190679

Is mono fast enough for Mac OS X?

I have to use .NET/C# for the next company project. As I've developed my project on Mac, I looked into the mono for development environment/tool.

Is the mono for Mac OS X is fast enough? I mean, what about the performance in running the assembly compared to running the same code on .NET under windows machine?

Do I have to buy PC laptop for developing C#/.NET in practical sense?

EDIT: Thanks for the answers. I see that the other thing I should consider would be compatiblity issues and development tools. I wanted to ask how good mono is; if mono is 10 times slower than windows .NET. I'd better not using it. But, if mono is just 1.5 times slower, then why not?

Upvotes: 3

Views: 2464

Answers (7)

pablo
pablo

Reputation: 6402

We have developed code for Mac OS X on Mono for about 5 years already. Performance has been getting better and better. GUIs will heavily depend on the library you choose. MonoMac seems to be an excellent option right now.

Upvotes: 0

miguel.de.icaza
miguel.de.icaza

Reputation: 32694

For interactive applications, you wont typically notice any performance difference between Mono and .NET on equivalent hardware.

There are a few things that you will notice:

  • Mono's current GC is conservative, not generational.
  • Mono's codegen engine is not as advanced as .NET's.
  • On computationally intensive tasks (for example, doing image processing or video processing), expect Mono to be 70% of the speed of .NET.
  • Mono on OSX has a few known slow code paths for thread local storage and a handful of other small problems.

All of these are focus areas for the team, so you will see changes in both cases soon enough. We are working on a new GC that is generational, like .NET, a preview will debut in 2.8.

The codegen engine can now optionally use LLVM, in 2.6 it is ok, in 2.8 it will have 99.8% code coverage (from the current 60 or 70). Sadly LLVM makes for very slow JIT compile times, so we only use it for "ngen" like scenarios or for programs that want better performance at the cost of startup speed.

With LLVM we are able to match .NET and Java on most tests, with a handful of exceptions.

Finally, OSX-specific limitations are being worked on, and will also be in 2.8.

Upvotes: 15

Warren  P
Warren P

Reputation: 68862

If you are being paid to write a C#.net solution that has to be run on Windows in its final form, you can not get away with developing it any other way. Or let me put it to you this way; Did you ask your boss? Go do that. We'll wait.

You can use Mac hardware to run a Windows OS though. You can use your Mac, with VMWare or Parallels, or BootCamp.

Upvotes: 1

Dinah
Dinah

Reputation: 54017

To answer your question directly: yes, Mono's performance is fast enough for developing on the Mac. When we ported Remoting code from .NET to Mono a few years ago, things went very very badly but I've been told that Mono has been greatly improved since then. Regarding development environments: #develop and MonoDevelop are cross-platform.

Now to get practical:

The gist behind this question seems to be the idea of avoiding purchasing a Windows license and using Mac and Mono only. This is a terrible idea. I would never release any product, even internally, that I've never even run myself in the intended environment. Even if you abhor Windows and all that it stands for, if you're writing software for Windows, you owe it to your users to thoroughly test it in Windows.

That said: I'd recommend Boot Camp and Parallels/VMWare.

Boot Camp
The best .NET development tools are Windows only. Even if you find an alternate dev. environment that you prefer, you'll eventually want to test your apps running at native speed.

VMs
VMs are good enough for most testing and debugging. If your app has the possibility to do any damage, you'll especially want to use VMs for sandboxing. At my last job, we did low-level invasive scanning and tweaking. When our code was buggy, we could REALLY mess things up. All of our testing happened in VMs long before we put them on real boxes.

The above will allow you to own only a Mac (assuming it's Intel-based) and will still allow you to do all of your development in OS X + Mono if you so desire. It just will not allow you to avoid Windows.

Upvotes: 7

Mike Cellini
Mike Cellini

Reputation: 340

I would say you should at least get a copy of Windows running inside Bootcamp or Parallels Desktop. For development I would say Bootcamp for performance reasons.

Mono doesn't necessarily support everything in the .NET Framework. Most of it, yes, but not all of it.

Also will you need a local copy of SQL Server (Express)? Most projects I know of using .NET also use SQL Server for their data back end. You'll need windows for that as well if it is the case.

Generally, when developing for a particular environment, you should be running that environment.

Upvotes: 0

Shaggy Frog
Shaggy Frog

Reputation: 27601

If you have an Intel-based Mac, no, you don't need to buy a new computer. You can use Boot Camp or Parallels to run Windows natively.

Upvotes: 2

Cory Charlton
Cory Charlton

Reputation: 8938

If the target platform is a Windows PC then I highly recommend you get one. Not necessarily for development (although that would make it easier) but definitely for testing and hunting bugs.

Edit: I'm not a Mac guy but can't you run Windows in a virtual PC or something like that that comes with your OS? As far as .NET/C# goes you're going to be hard pressed to find a better IDE than Visual Studio (personal opinion).

Upvotes: 3

Related Questions