Skip to content

MeadowsJoe/Rasterization-Optimization

Repository files navigation

Software Rasteriser Optimisation

C++20 AVX2 SIMD

A CPU software rasteriser optimised for performance, reaching 3 to 5x speedups through SIMD vectorisation, multithreading, and cache-aware restructuring. Written in C++20.

Output

Results

Scene Baseline (ms) Optimised (ms) Speedup
Scene A TODO TODO 3.1x
Scene B TODO TODO 5.2x
Scene C TODO TODO 3.4x

Approach

  • Profiled first to find the hotspots, then optimised them in priority order rather than guessing.
  • AVX2 SIMD vectorisation of the per-pixel and per-vertex hot paths.
  • Multithreading with std::jthread across screen regions.
  • Cache-friendly data restructuring, branch early-exits, and unrolled matrix math.

Tech stack

C++20 · AVX2 · std::jthread

Build & run

Requires: a C++20 compiler with AVX2 support.
git clone https://github.com/MeadowsJoe/<repo>.git
# build (Release / -O2 with AVX2 enabled), then run the benchmark

Full technical write-up

The full breakdown of each optimisation and its measured impact is in docs/technical-writeup.pdf.

Future work

  • AVX-512 path where available.
  • GPU comparison baseline.
  • Tile-based threading to cut false sharing.

About

Software rasteriser optimised with AVX2 SIMD and multithreading for 3 to 5x speedups. Written in C++20.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages