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 allocations in PANOC, PANOCplus, ZeroFPR, DRLS #74

Merged
merged 6 commits into from
Mar 6, 2022

Conversation

lostella
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Feb 27, 2022

Codecov Report

Merging #74 (5e4f5d1) into master (2d72fdd) will increase coverage by 0.27%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #74      +/-   ##
==========================================
+ Coverage   88.93%   89.21%   +0.27%     
==========================================
  Files          21       21              
  Lines         886      909      +23     
==========================================
+ Hits          788      811      +23     
  Misses         98       98              
Impacted Files Coverage Δ
src/algorithms/drls.jl 96.25% <100.00%> (+0.47%) ⬆️
src/algorithms/panoc.jl 97.82% <100.00%> (+0.12%) ⬆️
src/algorithms/panocplus.jl 93.82% <100.00%> (+0.32%) ⬆️
src/algorithms/zerofpr.jl 94.36% <100.00%> (+0.42%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2d72fdd...5e4f5d1. Read the comment docs.

@lostella
Copy link
Member Author

lostella commented Feb 27, 2022

Allocations went down in benchmarks, as expected. However, there is a strange increase in allocations for DRLS, so I'll need to look deeper into it. Time increases are probably just noise.

                                       ID  time ratio memory ratio
  ––––––––––––––––––––––––––––––––––––––– ––––––––––– ––––––––––––
       ["Lasso medium (Float64)", "DRLS"]   1.01 (5%)  0.78 (1%) ✅
      ["Lasso medium (Float64)", "PANOC"]   1.02 (5%)  0.28 (1%) ✅
  ["Lasso medium (Float64)", "PANOCplus"]   0.99 (5%)  0.61 (1%) ✅
    ["Lasso medium (Float64)", "ZeroFPR"]   0.99 (5%)  0.36 (1%) ✅
        ["Lasso small (Float64)", "DRLS"]   0.98 (5%)  0.76 (1%) ✅
       ["Lasso small (Float64)", "PANOC"]   0.95 (5%)  0.31 (1%) ✅
   ["Lasso small (Float64)", "PANOCplus"]   0.97 (5%)  0.64 (1%) ✅
     ["Lasso small (Float64)", "ZeroFPR"]   0.97 (5%)  0.40 (1%) ✅
       ["Lasso tiny (Float64)", "AFBA-2"] 1.08 (5%) ❌    1.00 (1%)
         ["Lasso tiny (Float64)", "DRLS"] 1.08 (5%) ❌  1.03 (1%) ❌
        ["Lasso tiny (Float64)", "PANOC"] 0.91 (5%) ✅  0.44 (1%) ✅
    ["Lasso tiny (Float64)", "PANOCplus"] 0.92 (5%) ✅  0.65 (1%) ✅
      ["Lasso tiny (Float64)", "ZeroFPR"] 0.94 (5%) ✅  0.59 (1%) ✅

@lostella lostella changed the title Reduce allocations in PANOC, ZeroFPR Reduce allocations in PANOC, PANOCplus, ZeroFPR Feb 27, 2022
@lostella
Copy link
Member Author

@aldma could you please confirm the changes in PANOCplus are OK?

Copy link
Collaborator

@aldma aldma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
The overwriting of x_prev and res_prev works because update_direction_state! is invoked only once just before returning.

@lostella lostella changed the title Reduce allocations in PANOC, PANOCplus, ZeroFPR Reduce allocations in PANOC, PANOCplus, ZeroFPR, DRLS Feb 28, 2022
@lostella lostella mentioned this pull request Feb 28, 2022
@lostella lostella merged commit 9de4d48 into JuliaFirstOrder:master Mar 6, 2022
@lostella lostella deleted the reduce-allocations branch March 6, 2022 10:47
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

Successfully merging this pull request may close these issues.

2 participants