Which one has better performance, data types .NET or alias name data types C#?please Complete reading this post to end

  • Thread starter Thread starter Reza1992
  • Start date Start date
R

Reza1992

Guest
Hi to all first of all i am sorry because my first language is not english I want understand which one has better performance C# data types or .net data types i try to understand by below code i test this code both with x86 and x64 platform.(I emphasize please Complete reading this post to end and If in doubt do not give the wrong answer and please Answer me with a document )

StopWatch SW=new StopWatch();
SW.Start();
for (Int32 i = 0; i < 99999; i++)
{
for (Int32 j = 0; j < 999; j++)
{
Int32 a = 37;
Int32 b = 37;
Double c = Math.Pow(a, b);
String d = "abcde";
String e = "abcde";
String f = d + e;
}

second code

Stopwatch SW = new Stopwatch();
SW.Start();
for (int i = 0; i < 99999; i++)
{
for (int j = 0; j < 999; j++)
{
int a = 37;
int b = 37;
double c = Math.Pow(a, b);
string d = "abcde";
string e = "abcde";
string f = d + e;
}


}
Console.WriteLine(SW.Elapsed.TotalMilliseconds);
SW.Stop();
Console.ReadKey();

in below link "said all data types are converted into .Net Data type"What does this mean?I think if this word is true so converting C# alias data types to .net data types it takes time and i tested this by above codes but i am not sure if anyone sure(not unsure I emphasize) please answer me. somebody answer there is no deference in performance but i think this is not my answer thanks a lot.link is "Difference Between Data Type in C# and Data Type in .NET" The third paragraph.

Continue reading...
 
Back
Top