Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Oops! Actually that's technically not right. Volatile prevents re-ordering optimisations. It's such a common misconception that I had to ask MS to review the documentation a while back: https://github.com/dotnet/docs/issues/5206
While there are scenarios where using a native library certainly makes sense, that doesn't come for free. Using native code adds overhead (in many cases, having a full implementation in C# can be faster than invoking a C++ assembly), and it kills your portability, and makes maintenance harder. There are libraries out there, such as ImageSharp that are great examples of how you can have a fully managed implementation of a native image processing library that has speed that are on the same level (or actually, faster in some cases) than native libraries, with also the advantage of being able to run everywhere.