Skip to content

Conversation

tveasey
Copy link
Contributor

@tveasey tveasey commented Nov 29, 2019

The principal change is to bucket the candidate split points so we only check a subset of the splits when searching for the derivatives to update when computing split statistics. There are also some smaller optimisations which profiling showed up as worthwhile. The impact is largest for the case we have many metric valued features. These are pure runtime optimisations, i.e. the results are unaffected.

std::size_t beginRows,
std::size_t endRows,
TRowFunc func,
TRowFunc& func,
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems dodgy to pass this by lvalue reference here, as when it's passed on again it's passed on with std::move(func). Should it be an rvalue reference here too?

Same for sequentialApplyToAllRows.

Copy link
Contributor Author

@tveasey tveasey Nov 29, 2019

Choose a reason for hiding this comment

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

This can be an rvalue reference, but not in sequentialApplyToAllRows because I don't move from there and pass down by reference to another function in a loop.

(It ought to be equivalent passing by lvalue reference because the upshot is it'll still get moved into SCallableWithBoundState, but perhaps passing by rvalue reference makes the intention clearer.)

Copy link
Contributor

@valeriy42 valeriy42 left a comment

Choose a reason for hiding this comment

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

LGTM. Good work!

@tveasey tveasey merged commit 4a695ef into elastic:master Dec 2, 2019
@tveasey tveasey deleted the prediction-speedups branch December 2, 2019 09:51
tveasey added a commit that referenced this pull request Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants