. NET Core and. NET. Framework speed comparison, core. framework

Source: Internet
Author: User

. 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 ();
}

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.