set_optimization: Set compiler optimization
Description
Write a user Makevars with updated optimization levelUsage
set_optimization(level = 3, omit.debug = FALSE, disable.asserts = FALSE,
suppress.warnings = FALSE, overwrite = FALSE)show.Makevars()
rm.Makevars()
Arguments
level
the compiler optimization level (-O<level>)
omit.debug
if true, remove "-g" from flags
disable.asserts
if true, set NDEBUG define
suppress.warnings
if true, suppress compiler warnings
overwrite
if true, overwrite existing Makevars file
Details
This function will change the optimization flags used
when compiling code. It will write the file "Makevars" to the
".R" directory in your "$HOME" directory. These setting will
effect all subsequent compiles, even package installation,
unless you remove or edit the "Makevars" file. This function assumes that your compiler uses "-O" to
indicate optimization level and "-g" to indicate that
the compiler should issue debugging symbols. Please let me know if this function fails for your
compiler. (Submit and issue on GitHub.)