JunoLab / Juno.jl

MIT License
144 stars 23 forks source link

use 2 instead of 3 as the default optimization level #551

Closed JeffBezanson closed 4 years ago

JeffBezanson commented 4 years ago

A long time ago I believe -O3 enabled some significant optimizations (e.g. vectorization) that were not enabled for -O2. However, that is no longer the case and -O2 and -O3 are now nearly identical. Furthermore, in the future it's possible we will make some trade-offs to give better latency with -O2, and -O3 could mean "I don't care how long compilation takes; go nuts". So -O2 is the best default, certainly for an interactive environment. (In fact -O1 is even better, but we'd run the risk of losing too many benchmark battles.)