Paul Krill
Editor at Large

.Net Core 2.0 to extend coding optimizations to Linux

news
Jul 21, 20172 mins

The next version of Microsoft's open source, cross-platform runtime will make native code run faster on Linux as well as Windows

100515 microsoft linux
Credit: Microsoft

The next version of Microsoft’s open source, cross-platform version of the .Net software platform, .Net Core 2.0, will bring profile-guided optimization (PGO) to Linux x64. PGO is native compilation technology used by the C++ compiler to generate faster-running code. 

PGO features a two-step process, including a training run that records information about execution and a build step that uses the results of the training run to generate better optimized code, Microsoft’s Bertrand Le Roy and Daniel Podder explained in a blog post. The .Net Core 2.0 upgrade will add PGO optimizations to .Net Core on both the Windows x86 and Linux x64 platforms. PGO began working with Windows x64 in the .Net Core 1.1 release and it has been used in the Windows-based .Net Framework for years.

Fragmentation in the Linux ecosystem, with different compiler tool chains across distros, makes PGO harder to do on Linux than on Windows, Le Roy and Podder note. “A simplifying factor on Linux is that we’re now building a unique ‘Linux’ version of .Net, that we’re then packaging into native installers and tarballs,” they wrote. “This made it possible to apply the PGO optimizations to all the distributions that consume those common bits with reduced complexity.” Mozilla, for its part, also has enabled use of PGO in its own build system for the Firefox browser.

.Net Core 2.0 currently is in a preview stage. PGO applies only to internal, native-compiled components of the runtime and JIT compilation, so .Net Core users do not need to take action to realize the benefits. All managed applications automatically get the benefit of PGO. Benefits will vary based on the application. “In this release, we’ve applied those optimizations to the native parts of the runtime, based on profiling data from typical .NET applications,” Le Roy and Podder wrote. “In a future release, we’re planning on applying similar optimizations to the managed components of the Net. Core stack.”

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author