Compile with -O3 by default

Seems to give some benefit both for gcc and clang, and more than individual optimizations that are enabled by it. I also tried some further optimizations that are not enabled by -O3, but they seem to have no effect or slow down.