News

.NET Core 2.1 Powers 34 Percent Bing Performance Boost

The modernization of the .NET ecosystem is paying off for Microsoft's Bing.com engineering team, which reports a 34 percent performance boost for the search engine following a shift from .NET Framework to .NET Core 2.1

By "eating its own dogfood," as the saying goes, Microsoft also reports runtime-adoption agility and start-up time gains for Bing.com.

Those all resulted from maturation of the .NET Core initiative, which started with .NET Core 1.0 in June 2016. It's a remake of the staid, 16-year-old, Windows-only .NET Framework, taking .NET cross-platform, modular and open source, with more flexible deployment options. It works hand-in-hand with .NET Standard, which defines all the APIs that should be available to all .NET implementations.

The Bing engineering team began moving to .NET Core/.NET Standard early, but was stymied by the lack of supported APIs in v1.x releases. The release of .NET Standard 2.0 added more than 20,000 APIs to the initiative, and the team began to gain traction in its migration off .NET Framework.

"Since its beginning, Bing.com has run on the .NET Framework, but it recently transitioned to running on .NET Core," explained Mukul Sabharwal of the Bing.com engineering team in a Monday (Aug. 20) blog post. "The main reasons driving Bing.com's adoption of .NET Core are performance (a.k.a serving latency), support for side-by-side and app-local installation independent of the machine-wide installation (or lack thereof) and ReadyToRun images.

"In anticipation of those improvements, we started an effort to make the code portable across .NET implementations, rather than relying on libraries only available on Windows and only with the .NET Framework. The team started the effort with .NET Standard 1.x, but the reduced API surface caused non-trivial complications for our code migrations. With the 20,000+ APIs that returned with .NET Standard 2.0, all that changed, and we were able to quickly shift gears from code modifications to testing. After squashing a few bugs, we were ready to deploy .NET Core to production."

By exploiting many .NET Core 2.1 performance improvements coming with its release in May, Sabharwal said, internal server latency over the last few months was improved by 34 percent:

Internal Server Latency Improvements
[Click on image for larger view.] Internal Server Latency Improvements (source: Microsoft).

He also cited gains with ReadyToRun images (code precompiled as a pre-deployment step rather than on local machines) and runtime agility, which resulted from "the ability to have an xcopy version of the runtime inside our application" that let the team adopt new runtime versions quicker.

The .NET Core 2.1 performance improvement that Sabharwal cited as being most impactful was better string manipulation, and he details several more in his post.

And, Sabharwal said, the team expects more to come: "We're excited about the future and are collaborating closely with the .NET team to help them qualify their future updates! The .NET Core team is excited because of our large catalog of functional tests and an additional large codebase to measure real-world performance improvements on, as well as our commitment to providing both Bing.com users fast results and our own developers working with the latest software and tools."

About the Author

David Ramel is the editor of Visual Studio Magazine.

comments powered by Disqus
Most   Popular
Upcoming Events

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.