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

BoundsIntegral performance improvement #198

Open
AntoinePrv opened this issue Jun 15, 2021 · 1 comment · Fixed by #204
Open

BoundsIntegral performance improvement #198

AntoinePrv opened this issue Jun 15, 2021 · 1 comment · Fixed by #204
Assignees
Labels
type/enhancement 🚀 New feature or request

Comments

@AntoinePrv
Copy link
Member

Describe the problem or improvement suggested

Right now, the complete history of bounds is stored in the event handler and the integral is recomputed from start before taking a difference.

Describe the solution you would like

Only store the values since the last call to extract and compute directly the integral difference from this.
Something like

auto const& primal_bounds = ...

auto inegral = Reward{0.};
if(...){
    integral = compute_primal_integral(primal_bounds);
} else {
    ...
}

handler.clear_all_but_last();
// No need to compute diff anymore
return integral;

Additional context

#144

@AntoinePrv AntoinePrv added the type/enhancement 🚀 New feature or request label Jun 15, 2021
@jdumouchelle jdumouchelle mentioned this issue Jun 23, 2021
4 tasks
@gasse gasse reopened this Jun 29, 2021
@gasse
Copy link
Member

gasse commented Jun 29, 2021

We can further improve the code, and get rid of the vector altogether by accumulating the integral on-the-fly without storing all intermediate bound values.

Let's keep this issue open until we do it when we have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement 🚀 New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants