Richard said:
Arne Vajhøj said:
Let me explain the background. We were developing an analysis product for a
UK bank, we already had working code, and we were asked to try our code
out under .Net - which we did. It ran sixty times slower. Our jaws
dropped, we laughed, and we didn't bother with .Net from then on. Ever.
If you're supposed to be hauling eight thousand tons of freight from London
to Newcastle, and the boss suggests you try using a bicycle instead of
your existing freight train, well, you might give it a go (because it's
the boss asking), but when it doesn't work it would be very silly to blame
yourself for not studying the bicycle enough. You just go back to your
freight train.
Hauling cargo is usually not done the fastest way, just to make a point
here. The cost of doing so far outweighs the actual benefits. There is
typically a sweet spot where you calculate the cost of fuel, increased
wear and tear, and thus maintenance, against the reduced cost of labor,
and time-to-market. I've seen examples of around 75% of the best speed.
Bicycle? no... Trucks? perhaps...
My point? The task of picking the "best tool for the job" should never
use only one measurement to determine the "bestness".
Now, I'm not saying that you could justify switching to a system that
ran your workload at 1/60th of the current speed, but there could be
other trade-offs that could lead you to accept some speed degradation to
get other benefits, perhaps by rewriting the engine using a more
..NET-based approach. Since you don't describe the workload, I'll assume
the best .NET-based approach for this workload ran at 1/60th of the
speed of your current solution. In this case, .NET is entirely the wrong
tool for this particular job.
In your case it might not be possible to get pure .NET managed code to
do what you wanted with the speed you required, but its all about
picking the best tool for the job. Perhaps building the GUI would be
better with .NET and C++ would be better for your analysis engine.
All I can say is that .NET apps does not by a long shot run generally at
1/60th of the speed of a non-.NET app. I've seen faster ones, and I've
seen slower ones. To be fair, many of the slower ones were *really* slow
compared to the non-.NET implementation, but in that case the wrong tool
was being used.
It all depends.
In the original posters case, there are loads of questions that would
have to be asked before a reliable answer could be given to the question
of what is the best tool. Here's just a few of them:
- what is the program supposed to do?
- what kind of programming languages/systems do you know already?
- why the criteria of single-exe, no installer?
- what is the target userbase? (linked to what the program is supposed
to do)