Back
Close

Parallelism on single Core with .NET C# and SIMD / AVX. First Example.

AIdevOOPs
2,647 views

Welcome!

This C# code will shows to us a simple basic examples of SIMD / AVX. We will compare the sum of two arrays of integers without SIMD and with it. The performance increasing is awesome!

The source code is on GitHub, please feel free to come up with proposals to improve it.

Hands-on Demo

Run this ready to use benchmark
// {...}
public static void run_SIMD_AVX_on_CSharp(){
allBench(loop: 10000, arraySize: 500, rerun: 10); // array size will be multiplied by 16
}
//{...}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants