Assessing functions performance by compilation
I have done some tests using compiled functions, following the issue in s2dv es/s2dv#15 (closed) and the JIT compiler package https://earth.bsc.es/gitlab/es/requests/-/issues/1311.
The code is in /esarchive/scratch/nperez/git/Flor/s2dverification_tests/Compiled_test.R
For the case in the test, the current version of Regression() in s2dv seems good enough (last line in table).
The compiler could be evaluated in the case of Apply (given results showed by An-Chi in requests issue). It would be useful to use Profvis() to find the bottlenecks.