Added -O2 flag to release compilation