Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce number of compiled examples #347

Open
richfitz opened this issue Nov 17, 2021 · 1 comment
Open

Reduce number of compiled examples #347

richfitz opened this issue Nov 17, 2021 · 1 comment

Comments

@richfitz
Copy link
Member

I think that this can be reduced down to only sir and volatility with no great loss of functionality. Offer to compile the other ones for users where necessary, and think about some system for caching a set of builds somewhere

@richfitz
Copy link
Member Author

at the same time consider making densities.cpp and test_*.cpp compile in only when needed as they're just for testing really.

With that done we're down to 6MB for the .so with debugging symbols

bloaty shows that most of the issues are limited to debug symbols really, but the pointer .o file is surprisingly large:

$ bloaty -d compileunits dust.so 
    FILE SIZE        VM SIZE    
 --------------  -------------- 
  15.6%  1.60Mi  18.6%   441Ki    sir.cpp
  15.4%  1.59Mi  15.8%   375Ki    sirs.cpp
  13.5%  1.39Mi  14.1%   333Ki    dust_rng_pointer.cpp
  10.8%  1.12Mi   7.4%   176Ki    variable.cpp
  10.7%  1.10Mi   8.5%   201Ki    volatility.cpp
   8.3%   878Ki  10.5%   250Ki    dust_rng.cpp
   8.3%   870Ki   5.3%   125Ki    walk.cpp
   5.6%   584Ki   2.4%  57.5Ki    test_rng.cpp
   5.5%   576Ki   8.5%   201Ki    cpp11.cpp
   1.4%   149Ki   0.2%  4.66Ki    test_cuda_launch_control.cpp
   1.0%   106Ki   0.1%  3.05Ki    tools.cpp
   1.0%   106Ki   0.7%  16.7Ki    densities.cpp
   0.8%  86.2Ki   0.4%  9.80Ki    openmp.cpp
   0.7%  75.2Ki   3.2%  75.2Ki    [section .gnu.hash]
   0.5%  53.5Ki   2.3%  53.5Ki    [section .gcc_except_table]
   0.2%  20.4Ki   0.7%  17.2Ki    [30 Others]
   0.2%  17.9Ki   0.8%  17.9Ki    [section .gnu.version]
   0.1%  15.7Ki   0.0%       0    [section .strtab]
   0.1%  14.5Ki   0.6%  14.5Ki    [section .dynstr]
   0.1%  8.27Ki   0.0%       0    [section .symtab]
   0.1%  7.07Ki   0.0%       0    [Unmapped]
 100.0%  10.3Mi 100.0%  2.32Mi    TOTAL

though almost all of that (76%) is debug symbols

@richfitz richfitz added this to the CRAN release (v1.0.x) milestone Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant