Geting 4x Speedup With .NET Core 3.0 SIMD Intrinsics

Geting 4x Speedup With .NET Core 3.0 SIMD Intrinsics

“The C++ code listed below, being translated to C#, will never be close to C++ in terms of speed.”

A few weeks ago Den Raskovalov and I had a fancy conversation on C## performance, which turned into a tiny but fun coding exercise. The statement to prove or disprove was:

“The C++ code listed below, being translated to C#, will never be close to C++ in terms of speed.”

auto computeSum(char* fileName) {
        auto fIn = open(fileName, O_RDONLY | O_BINARY, 0644);

        static constexpr size_t BUFFER_SIZE = 1 << 16;
        uint8_t buffer[BUFFER_SIZE];
        uint8_t const* pBuffer = nullptr;
        size_t bufferPos = 0;
        size_t bufferLen = 0;

        int64_t sum = 0;
        uint8_t b;
        int n = 0;
        while (bufferLen = read(fIn, buffer, BUFFER_SIZE)) {
            pBuffer = buffer;
            const uint8_t* const pBufferEnd = buffer + bufferLen;
            while (pBuffer != pBufferEnd) {
                if (*pBuffer < 128) {
                    n = (n << 7) + *pBuffer;
                } else {
                    n = (n << 7) + *pBuffer - 128;
                    sum += n;
                    n = 0;
        return sum;

avx dot-net-core simd c-sharp-programming programming

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

jQuery Ajax CRUD in ASP.NET Core MVC with Modal Popup

In this article, we’ll discuss how to use jQuery Ajax for ASP.NET Core MVC CRUD Operations using Bootstrap Modal. With jQuery Ajax, we can make HTTP request to controller action methods without reloading the entire page, like a single page application.

MVC User Registration & Login with ASP.NET Core Identity

In this article, we will discuss the quickest way to use ASP.NET Core Identity for User Login and Registration in a new or existing MVC application.

Announcing Entity Framework Core (EF Core) 5 RC2

Entity Framework Core EF Core 5.0 gets closer to a final release. RC2 is now available with bug fixes and a go-live license.

C programming for Beginners | Learn C Programming | C Language

C Language is an evergreen language and is used widely across different industries, This C programming is a must for students and working professionals to become a great Software Engineer especially when they are working in Software Development Domain. Great Learning brings you this live session on "Introduction to C". In this live session, we will be covering major concepts in C Programming such as Different Variables, Different Data Types that are being used, its Operators, Flow control statements, Structure, and lot more.

Running WordPress on ASP.NET Core with Peachpie

In this article, you will learn how to use or integrate WordPress in ASP.NET and Running WordPress on ASP.NET Core, without PHP, or any source files on the server. The following demonstration will show you how to add WordPress as a frontend to an existing ASP.NET Core application step by step.