Don't say much nonsense! is the. NET core and. NET Framework speed comparison.
Both use the slowest bubbling sorting algorithm: Sort 100,000 data
Number |
. NET CORE (Time consuming) |
. NET Framework (time-consuming) |
First time |
|
|
Second time |
|
|
Third time |
|
|
On average,. NET core takes 39 seconds, while. NET FW averages 49 seconds. Under the same conditions. NET Core performance leadership.
It's just a simple test. I believe that. NET core will not disappoint. NET programmers.
A bit of code, you can test it.
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 ();
}