Skip to content

Conversation

@ivafanas
Copy link

@ivafanas ivafanas commented Aug 20, 2024

Port of opencv/opencv#26046

Speedup DTreesImplForRTrees::getVotes method in about x2 times.

Mat objects are usually not expensive for creation or copying. But if algorithm itself is fast, operations on Mat objects start to take significant time. Naive extraction of loop invariant temporary Mat wrapper object creation allows to decrease getVotes method run time in about x2 times.

@asmorkalov asmorkalov self-requested a review August 27, 2024 15:36
Copy link
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

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

👍

@asmorkalov asmorkalov added the category: ml Classic Machine Learning label Aug 27, 2024
@asmorkalov asmorkalov merged commit bdd093b into opencv:5.x Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: ml Classic Machine Learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants