Vc VS DirectXMath

Compare Vc vs DirectXMath and see what are their differences.

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
Vc DirectXMath
6 13
1,417 1,481
1.8% 1.6%
6.1 6.8
3 months ago 20 days ago
C++ C++
BSD 3-clause "New" or "Revised" License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Vc

Posts with mentions or reviews of Vc. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-30.
  • The Bitter Truth: Python 3.11 vs Cython vs C++ Performance for Simulations
    2 projects | /r/cpp | 30 Dec 2022
    Most high-performance math libraries perform a lot of vectorization (Eigen, etc) under the hood. And you've got stuff like Klein, Vc (which is reminiscent of std::valarray), etc. Then there's OpenMP's #pragma omp simd (assuming version 4.0 or greater).
  • John "God" Carmack: C++ with a C flavor is still the best (also: Python performance "keeps hitting me in the face")
    5 projects | /r/cpp | 21 Aug 2022
    I personally like the ideas in Parallelism v2 TS, which is available in for libstdc++ 11 onwards. The reference implementation is a library named Vc (afaik Vc is the most popular SIMD library for C++), and this has also been implemented in recent versions of HPX.
  • SPO600 project part 2
    2 projects | dev.to | 13 Apr 2022
    First of all about our project, I previously decided to work with VC library.https://github.com/VcDevel/Vc
  • SPO600 project part 1
    8 projects | dev.to | 22 Mar 2022
    I've decided to switch to something better, and after a few hours of searching, I found this repository: NSIMD https://github.com/agenium-scale/nsimd FastDifferentialCoding https://github.com/lemire/FastDifferentialCoding VS https://github.com/VcDevel/Vc XSIMD https://github.com/xtensor-stack/xsimd
  • Vc 1.4.2 released: portable SIMD programming for C++
    3 projects | /r/cpp | 23 Jun 2021
  • All C++20 core language features with examples
    10 projects | news.ycombinator.com | 7 Apr 2021
    > - Waiting for Cross-Platform standardized SIMD vector datatypes

    which language has standardized SIMD vector datatypes ? most languages don't even have any ability to express SIMD while in C++ I can just use Vc (https://github.com/VcDevel/Vc), nsimd (https://github.com/agenium-scale/nsimd) or one of the other ton of alternatives, and have stuff that JustWorksTM on more architectures than most languages even support

    - Using nonstandard extensions, libraries or home-baked solutions to run computations in parallel on many cores or on different processors than the CPU

    what are the other native languages with a standardized memory model for atomics ? and, what's the problem with using libraries ? it's not like you're going to use C# or Java's built-in threadpools if you are doing any serious work, no ? Do they even have something as easy to use as https://github.com/taskflow/taskflow ?

    - Debugging cross-platform code using couts, cerrs and printfs

    because people never use console.log in JS or System.println in C# maybe ?

    - Forced to use boost for even quite elementary operations on std::strings.

    can you point to non-trivial java projects that do not use Apache Commons ? Also, the boost string algorithms are header-only so you will end up with exactly the same binaries that if it was in some std::string_algorithms namespace:

    https://gcc.godbolt.org/z/43vKadbde

DirectXMath

Posts with mentions or reviews of DirectXMath. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-04-15.
  • Vector math library benchmarks (C++)
    3 projects | /r/GraphicsProgramming | 15 Apr 2023
    For those unfamiliar, like I was, DXM is DirectXMath.
  • Learning DirectX 12 in 2023
    13 projects | dev.to | 30 Jan 2023
    Alongside MiniEngine, you’ll want to look into the DirectX Toolkit. This is a set of utilities by Microsoft that simplify graphics and game development. It contains libraries like DirectXMesh for parsing and optimizing meshes for DX12, or DirectXMath which handles 3D math operations like the OpenGL library glm. It also has utilities for gamepad input or sprite fonts. You can see a list of the headers here to get an idea of the features. You’ll definitely want to include this in your project if you don’t want to think about a lot of these solved problems (and don’t have to worry about cross-platform support).
  • Optimizing compilers reload vector constants needlessly
    7 projects | news.ycombinator.com | 6 Dec 2022
    Bad news. For SIMD there are not cross-platform intrinsics. Intel intrinsics map directly to SSE/AVX instructions and ARM intrinsics map directly to NEON instructions.

    For cross-platform, your best bet is probably https://github.com/VcDevel/std-simd

    There's https://eigen.tuxfamily.org/index.php?title=Main_Page But, it's tremendously complicated for anything other than large-scale linear algebra.

    And, there's https://github.com/microsoft/DirectXMath But, it has obvious biases :P

  • MATHRIL - Custom math library for game programming
    3 projects | /r/cpp | 6 Jul 2022
    I am not in gamedev, but work with 3D graphics, we use DirectX 11, so DirectXMath was a natural choice, it is header only, it supports SIMD instructions (SSE, AVX, NEON etc.), it can even be used on Linux (has no dependence on Windows). It of course just one choice: https://github.com/Microsoft/DirectXMath.
  • When i had to look up what a Quaternion is
    2 projects | /r/ProgrammerHumor | 5 Jul 2022
  • Eigen: A C++ template library for linear algebra
    6 projects | news.ycombinator.com | 4 Apr 2022
    I never really used GLM, but Eigen was substantially slower than DirectXMath https://github.com/microsoft/DirectXMath for these things. Despite the name, 99% of that library is OS agnostic, only a few small pieces (like projection matrix formula) are specific to Direct3D. When enabled with corresponding macros, inline functions from that library normally compile into pretty efficient manually vectorized SSE, AVX or NEON code.

    The only major issue, DirectXMath doesn’t support FP64 precision.

  • maths - templated c++ linear algebra library with vector swizzling, intersection tests and useful functions for games and graphics dev... includes live webgl/wasm demo ?
    3 projects | /r/cpp | 12 Jan 2022
    If you’re the author, consider comparisons with the industry standards, glm and DirectXMath, which both ensure easy interoperability with the two graphics APIs.
  • Algorithms for division: Using Newton's method
    1 project | news.ycombinator.com | 8 Dec 2021
    Good article, but note that if the hardware supports the division instruction, will be much faster than the described workarounds.

    Personally, I recently did what’s written in 2 cases: FP32 division on ARMv7, and FP64 division on GPUs who don’t support that instruction.

    For ARM CPUs, not only they have FRECPE, they also have FRECPS for the iteration step. An example there: https://github.com/microsoft/DirectXMath/blob/jan2021/Inc/Di...

    For GPUs, Microsoft classified FP64 division as “extended double shader instruction” and the support is optional. However, GPUs are guaranteed to support FP32 division. The result of FP32 division provides an awesome starting point for Newton-Raphson refinement in FP64 precision.

  • Use of BLAS vs direct SIMD for linear algebra library operations?
    3 projects | /r/cpp | 28 Aug 2021
    For graphics DX math is a very good library.
  • Speeding Up `Atan2f` by 50x
    7 projects | news.ycombinator.com | 17 Aug 2021
    I wonder how does it compare with Microsoft’s implementation, there: https://github.com/microsoft/DirectXMath/blob/jan2021/Inc/Di...

    Based on the code your version is probably much faster. It would be interesting to compare precision still, MS uses 17-degree polynomial there.

What are some alternatives?

When comparing Vc and DirectXMath you can also consider the following projects:

highway - Performance-portable, length-agnostic SIMD with runtime dispatch

GLM - OpenGL Mathematics (GLM)

xsimd - C++ wrappers for SIMD intrinsics and parallelized, optimized mathematical functions (SSE, AVX, AVX512, NEON, SVE))

Eigen

libjxl - JPEG XL image format reference implementation

blaze

Fastor - A lightweight high performance tensor algebra framework for modern C++

MIRACL - MIRACL Cryptographic SDK: Multiprecision Integer and Rational Arithmetic Cryptographic Library is a C software library that is widely regarded by developers as the gold standard open source SDK for elliptic curve cryptography (ECC).

glibc - GNU Libc

highway - Highway - A Modern Javascript Transitions Manager