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

Optimize Peeling Machine #175

Open
4 tasks
reedacartwright opened this issue Jul 22, 2016 · 0 comments
Open
4 tasks

Optimize Peeling Machine #175

reedacartwright opened this issue Jul 22, 2016 · 0 comments

Comments

@reedacartwright
Copy link
Contributor

Currently the peeling machine is a vector of pointers to functions which gets called with arguments.

for(std::size_t i = 0; i < peeling_functions_.size(); ++i) {
     (*peeling_functions_[i])(work, family_members_[i], mat);
}

We should evaluate whether this is the most efficient strategy. Options include

  • Vector of function pointers (current configuration)
  • Vector of std::function objects to type erase the underlying function/functor/etc (more flexible option)
  • Vector of functor objects with virtual operator()() and family_members_[i] stored internally
  • Storing mat[i] instead of family members, but this would require a different peeling machine foreach mat we want to use.

Our current option should be the fastest, if we were not passing variables to it. However, it might be faster to wrap some of the options inside functors with virtual operators or type erasure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant