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

Some optimization suggestions for reducing CPU usage #13

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

ali-pahlevani
Copy link

💢 Optimizations:

File Optimization Description Estimated CPU Usage Reduction
Registration.cpp Vectorized TransformPoints Use Eigen matrix operations instead of per-point std::transform 5–15% of total runtime
Registration.cpp Precomputed kernel_squared Compute kernel * kernel once instead of repeatedly in Weight 0.5–1% of total runtime
Registration.cpp Improved Weight Function Reduce operations in weight computation from 4 to 2 multiplications + 1 addition 2–5% of total runtime
VoxelHashMap.cpp Squared Distance in GetClosestNeighbor Use .squaredNorm() for comparisons, with one sqrt at the end 10–20% of total runtime
VoxelHashMap.cpp Precomputed Statistics in GetClosestNeighbor Use sum_points and sum_outer for O(27) computation vs. O(27 * P) per query 15–25% of total runtime
VoxelHashMap.cpp Efficient AddPoints Simplify with for loop and map_.at(), maintaining precomputed stats 1–3% of total runtime
VoxelHashMap.cpp Optimized RemovePointsFarFromLocation Use iterator-based erase for safe and efficient removal 1–2% of total runtime
Overall Combined Effect Cumulative impact across all optimizations, varying with point cloud size and voxel density 20–50% of total runtime

@Daehan2Lee
Copy link
Member

Thanks for the optimization! I'll profile the changes this week and let you know which parts we can merge.

@ali-pahlevani
Copy link
Author

Thanks for the optimization! I'll profile the changes this week and let you know which parts we can merge.

Thank you for letting me ask for a pull request.
Great. I'll be eagerly waiting for your review.

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