Hello Danielm,
Try out both in release mode...
Cheers,
Adam
> Don't mean to waste news group space. But why is c# roughly 5 times
> faster than C++ running the same code. I certainly thought it would
> be the
> other way around.
> //c# .net 2.0
> int Fibonacci(int n)
> {
> if (n == 0 || n == 1)
> return n;
> else
> return Fibonacci(n - 1) + Fibonacci(n - 2);
> }
> //c++ VC++7 standard
> long Fibonacci(int n)
> {
> if (n == 0 || n == 1)
> return n;
> else
> return Fibonacci(n - 1) + Fibonacci(n - 2);
> }