Skip to content

A collection of microbenchmarks for various game- and graphics-centric vectormath libraries.

License

Notifications You must be signed in to change notification settings

RasterDuck/vectormathbench

Repository files navigation

Vector Math Benchmark

This project benchmarks several open source vector math libraries against one another to establish a baseline for performance. Currently, it tests GLM, DirectXMath, SimpleMath from DirectXTK, this fork of Sony's Vectormath, move::vectormath, and Realtime Math. It tests the performance of all libraries under SSE4.2, AVX, and AVX2.

Note that this repository was created with cmake-init, and much of what is here is boilerplate related to it. The only really important things in the repository are src/main.cpp, which includes all of the benchmarking code, and BENCHMARKS.md, which contains the latest benchmarking results.

Results

TL;DR: Based on the current benchmarks (reflected in intermediate-benchmarks.md), it seems that the generally highest performing configuration across both AMD and Intel is Realtime Math, though it lacks many features compared to the other libraries. move::vectormath seems to have generally similar performance to RTM (which makes sense given that it's built on top of RTM), though similarly suffers from a lack of features at the moment (though it does have more features than RTM, as well as including more game-centric extensions for RTM based on DXM/GLM, depending on the operation in question). DXM with SSE4.2 seems to be the fastest non-RTM library, though it trades blows with Vectormath for matrix operations and GLM for vector operations.

See the BENCHMARKS document for more details.

Building and installing

See the BUILDING document.

Contributing

See the CONTRIBUTING document.

Licensing

This project is licensed under GPLv3 to encourage users to contribute their additions back to the main project.

About

A collection of microbenchmarks for various game- and graphics-centric vectormath libraries.

Resources

License

Code of conduct

Stars

Watchers

Forks