In Creating and executing user-defined functions > Compiling and linking source code to build dynamically linkable libraries > Linux Switches, add the -O2 and -Wall switches to the list of compile switches.
Including the -O2 and -Wall switches in the list of compile UDF switches, when compiling C++ applications for building shared libraries on Linux, may decrease computation time.