- ASP.NET Core 2 High Performance(Second Edition)
- James Singleton
- 225字
- 2021-07-08 09:38:57
Performance improvements
Some of the more interesting changes in .NET Core 2.0 are performance improvements over the original .NET Framework. There have been tweaks to the implementations of many framework data structures. Some of the classes and methods that have seen speedy improvements or memory reduction include:
- List<T>
- Queue<T>
- SortedSet<T>
- ConcurrentQueue<T>
- Lazy<T>
- Enumerable.Concat()
- Enumerable.OrderBy()
- Enumerable.ToList()
- Enumerable.ToArray()
- DeflateStream
- SHA256
- BigInteger
- BinaryFormatter
- Regex
- WebUtility.UrlDecode()
- Encoding.UTF8.GetBytes()
- Enum.Parse()
- DateTime.ToString()
- String.IndexOf()
- String.StartsWith()
- FileStream
- Socket
- NetworkStream
- SslStream
- ThreadPool
- SpinLock
We won't go into specific benchmarks here because benchmarking is hard and the improvements you see will clearly depend on your usage. The thing to take away is that lots of work has been done to increase the performance of .NET Core. Many of these changes have come from the community, which shows one of the benefits of open source development. Some of these advances will probably work their way back to a future version of the regular .NET Framework too.
There have been improvements made to the RyuJIT Just In Time compiler for .NET Core 2 as well. As just one example, finally blocks are now almost as efficient as not using exception handling at all, which is beneficial in a normal situation where no exceptions are thrown. You now have no excuses not to liberally use try and using blocks, for example, by the checked arithmetic to avoid integer overflows.
- Dynamics 365 for Finance and Operations Development Cookbook(Fourth Edition)
- Mastering NetBeans
- The Supervised Learning Workshop
- 簡(jiǎn)單高效LATEX
- 樂(lè)學(xué)Web編程:網(wǎng)站制作不神秘
- Python自然語(yǔ)言處理(微課版)
- Unity 5.x By Example
- Flutter跨平臺(tái)開(kāi)發(fā)入門(mén)與實(shí)戰(zhàn)
- Microsoft Dynamics AX 2012 R3 Financial Management
- Python爬蟲(chóng)、數(shù)據(jù)分析與可視化:工具詳解與案例實(shí)戰(zhàn)
- Scratch從入門(mén)到精通
- Using Yocto Project with BeagleBone Black
- Practical Responsive Typography
- Practical Time Series Analysis
- Mastering Unity 2017 Game Development with C#(Second Edition)