News for hackers. Stuff that matters.
Re:Mono Developers start their own company by praeclarum on Tuesday May 17, 2011 @01:26PM (#2557047)
iCircuit is a performance hungry application so it's completely valid to ask about perf. Some points:

1. The majority (99%) of your app is not perf-circital. It's just setting some properties on UIViews and letting CoreAnimation do the rest, or reading data from the DB, or waiting on a network socket. If something is slow, you just throw it on a background thread with a continuation to resync it with the UI thread.

2. Over the years, I have found that micro-optimizations (like: allocating objects on the stack as in C vs allocation on the heap in C#, no dynamic dispatch in C vs lots of virtuals in C#, etc.) are _all_ that C give you and are not enough to make an app like iCircuit fast.

What you need instead is the ability to easily change and experiment with algorithms. C# gives me this -- programming in a strongly typed OOP language gives me the safequards I need to do this. The GC is what allows me to do this quickly and without pulling out my hair (caches in C/C++ drive me nuts because I have to be so careful about ownership rules of objects).

In a nutshell, I'm willing to trade the small (constant) perf hit in order to have better tools for tackling the hard problems - such as analyzing a 1,000 node circuit.

iCircuit contains one tight loop where it has to factor a very large matrix many times a second. That loop runs fine on .NET on desktop machines (don't even break a sweat), but I used a C function for the iOS version since there was about a 2X improvement of speed for this function. Fortunately, .NET makes it stupid easy to call C functions so I have the best of both worlds.

Re:Mono Developers start their own company by nimrody on Tuesday May 17, 2011 @01:47PM (#2557130)
Thanks for the detailed resposne!

Assuming I want to go this way - Do you find the mono development tools satisfactory (monodevelop) or do you use Microsoft's and later target iOS?