Add a benchmark for point cloud msg wrapper
Description
This MR has a small benchmark that pits the old point_cloud_utils
against the new PointCloudMsgWrapper
. It seems that the new way is around 10x faster.
On my machine the results are the following:
Run on (12 X 4500 MHz CPU s)
CPU Caches:
L1 Data 32 KiB (x6)
L1 Instruction 32 KiB (x6)
L2 Unified 256 KiB (x6)
L3 Unified 12288 KiB (x1)
Load Average: 0.58, 0.72, 0.82
***WARNING*** CPU scaling is enabled, the benchmark real time measurements may be noisy and will incur extra overhead.
------------------------------------------------------------------------------
Benchmark Time CPU Iterations
------------------------------------------------------------------------------
BenchMsgWrapperAddPointToCloud 447 ns 446 ns 1570940
BenchMsgWrapperPushBackPointToCloud 696 ns 694 ns 999862
BenchLidarUtilsAddPointToCloud 3591 ns 3581 ns 195271
BenchMsgWrapperAccessPoint 29.9 ns 29.9 ns 23206558
BenchLidarUtilsAccessPoint 352 ns 351 ns 1977485
Closes #1013 (closed)
Pre-review checklist for the author before submitting for review
Every developer is encouraged to be familiar with our contributor guidelines.
-
MR title and description help a friendly human understand the problem solved -
Sensible notes for the reviewer added to the section above to facilitate review -
MR fits the criteria of a "small change" listed below -
"WIP" or "Draft" removed from the MR title -
MR has a link to the original issue in the description, if it exists -
If the source branch is on a fork, MR is configured to allow commits from developers with access to push to the target branch -
Target branch set correctly. Default: master
-
MR assigned to a capable reviewer. Default: @JWhitleyWork
What is meant by a "small change"?
This is a template with a trimmed-down checklist for small MRs. Use it when no new functions, classes or other things that require testing have been added.
Examples are changes to documentation only, a fix for an off-by-one error, improving the CI, or changing log messages to be more informative. When in doubt, use the regular template.
Checklist for the reviewer
Only the reviewer is allowed to make changes in this section!
Mark all the items that are done, and cross out items not applicable to this MR.
- Basic checks
-
The MR title describes what is being done on the ticket -
The MR does not require additional tests or documentation to be written -
The first commit has a proper commit message to be used as a basis for the squashed commit created at the very end; e.g. [#928] Fix foo in bar
-
- Code correctness
-
The problem/feature is solved (reproducibly) -
The solution is performant enough for the use case in mind
-
- Open work
-
Any added source-code comment about future work refers to a follow-up GitLab issue explicitly; e.g., // TODO #551 refactor code below
-
If the MR provides an improvement, don't hesitate to add a
Post-review checklist for the author
After receiving approval:
-
All checkboxes in the MR checklist are checked or crossed out. Syntax example: 1. [ ] ~~this item crossed out~~
-
Assign MR to maintainer with sufficient rights to merge. Default: @JWhitleyWork