I have modified my R\'s makeconf file so that compiled code will use higher optimization flags than the default values. In particular I have set CXX = g++
makeconf
CXX = g++