. NET Core and. NET. Framework speed comparison, core. framework
Not much nonsense! Here is the comparison of. NET core and. NET framework speed.
The two use the slowest Bubble Sorting Algorithm: Sort 0.1 million pieces of data
Times |
. Net core (Time consumed) |
. NET framework (Time consumed) |
First time |
|
|
Second |
|
|
Third time |
|
|
On average, it takes 39 seconds for. net core and 49 seconds for. net fw. Under the same conditions,. net core is superior in performance.
This is just a simple test. I believe that. net core will not disappoint. net programmers.
You can test the code.
Static void maopao ()
{
Var d1 = DateTime. Now;
List <int> numbers = new List <int> ();
For (int I = 0; I <100000; I ++)
{
Numbers. Add (new Random (). Next (0, 999999 ));
}
For (int I = 0; I <numbers. Count; I ++)
{
For (int j = I + 1; j <numbers. Count; j ++)
{
If (numbers [I] <numbers [j])
{
Int temp = numbers [I];
Numbers [I] = numbers [j];
Numbers [j] = temp;
}
}
}
String d2 = (DateTime. Now-d1). ToString ();
Console. Write (d2 );
Console. ReadLine ();
}