C++ more than 15 times slower than C#??
I made this little project to check which one of them is faster... in the project: to an array the size of 100.000 the program had to put a factorial of a random number between 9 and 12. the C++ program measured time only for this. the C# program did the same AND!!! every time a new variable was calculated in the array, it saved that array spot in a text folder. (because i had to make sure it didnt skip any arrays because thats how fast it finished its job...) the result? C++ program: 33 s!!! C# program 2s ????? everywhere i read people say that c++ is faster... how is it faster when i get this big difference in results? The odes of the programs i have in my codes as C++ Speed Check and C# speed check. Please look at them and tell me what could be the reason for this. is C++ really that much slower?? https://code.sololearn.com/cs7kFX3cLI6U/#cs https://code.sololearn.com/cpQTcv64VRFA/#cpp