Skip to content

Instantly share code, notes, and snippets.

@htfy96
Last active January 4, 2021 09:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save htfy96/eb85d146fa5eed981e158a3036651730 to your computer and use it in GitHub Desktop.
Save htfy96/eb85d146fa5eed981e158a3036651730 to your computer and use it in GitHub Desktop.
-Osuperfast: gcc optimization flags used in our project
CXXFLAGS="-ffast-math -fdevirtualize-speculatively  -fassociative-math -freciprocal-math -fno-signed-zeros -fno-trapping-math -fipa-pta -mrecip=all -fgcse-sm -fgcse-las -fgcse-after-reload -march=native  -ftree-vectorize -floop-interchange -floop-block -ftree-coalesce-vars -floop-nest-optimize -fgraphite-identity -ftree-loop-ivcanon -fivopts" LDFLAGS="-ffast-math -fdevirtualize-speculatively"

Benchmark

Basic O3 + -march=native

rendering time = 91ms

Basic O3 + -march=native + -ffast-math + -mrecip=all

rendering time = 92ms

All flags

rendering time = 86ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment