Skip to content

Improve lidar odometry performance by replacing mutexes with thread-local reduction#321

Merged
JanuszBedkowski merged 1 commit into
MapsHD:mainfrom
bloom256:perf/optimize_lidar_odometry_2
Jan 20, 2026
Merged

Improve lidar odometry performance by replacing mutexes with thread-local reduction#321
JanuszBedkowski merged 1 commit into
MapsHD:mainfrom
bloom256:perf/optimize_lidar_odometry_2

Conversation

@bloom256
Copy link
Copy Markdown
Collaborator

This PR improves performance of lidar odometry compute_step_2 by removing mutex-protected shared reductions.

Changes:

  • Replace mutex-protected shared accumulation with thread-local accumulation using tbb::combinable.
  • Use tbb::blocked_range to amortize access to the shared combinable object, accessing it once per block instead of once per point.

Performance:

  • ~25% speedup observed for compute_step_2 on an Intel Core i7 machine.

Notes:

  • Intended to be behavior-preserving; only the parallel reduction mechanism changed.

@JanuszBedkowski JanuszBedkowski merged commit 4bf90c7 into MapsHD:main Jan 20, 2026
6 checks passed
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