Erzähl mir nochmal einer, dass nativ kompiliert so viel geiler ist als diese teuflische managed Zeugs!

Stevie, ich hab da nen .Net Fall, wo der generierte Code ähnlich wie bei Delphi langsam wird!
Also Normale Berechnung in ner Schleife:
Code:
const int Iterations = 1000000000;
int x = 3;
for (int i = 0; i < Iterations; i++)
{
x = x * 3;
}
Geschwindigkeit bei meiner CPU = ~500 ms.
So wenn ich aber jetzt
DAVOR/Danach x per reference/out benutze, wirds höllisch langsam.
Dann fällt der Speed auf ~3000 ms.
Code:
void Init(ref int x)
{
x = 3;
}
.....
Init(ref x);
for (int i = 0; i < Iterations; i++)
{
x = x * 3;
}
//Init(ref x);