-
Notifications
You must be signed in to change notification settings - Fork 246
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
Add benchmarking & some opti #227
Conversation
Full disclaimer, I did not actually run the math for |
In what consist the optimizations on ljacinv, rjacinv, etc? |
|
Oh OK I see. Yep, obviously much faster! |
Codecov Report
@@ Coverage Diff @@
## devel #227 +/- ##
==========================================
- Coverage 98.05% 97.90% -0.15%
==========================================
Files 48 49 +1
Lines 1436 1531 +95
==========================================
+ Hits 1408 1499 +91
- Misses 28 32 +4 |
@joansola This PR is ready when you are. Nevermind the failure coverage test nor the pending ones (looks like a bug). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I already had a look to all this some time ago, I approve right away
SE2Tangent::rjacinv/ljacinv
SE_2_3Tangent::rjacinv/ljacinv
This PR adds some micro benchmarks using Google benchmark. This allows to have some time-based benchmarks on a per-function basis so that one can compare different implementations.
The PR also contains numerous small optimizations, most of which do not actually show any benefit in the aforementioned benchmark. Those which do are listed below.
Most noticeably, implementing
SE2Tangent::rjacinv/ljacinv
(~6x / ~4.3x) andSE_2_3Tangent::rjacinv/ljacinv
(~4.5x / ~5x) are a big win.It also remove some unnecessary cmake warning suppression for the test/examples, fix the
average
unit test that was disabled and finally it runs the unit test both in Debug and Release on Ubuntu.Some numbers obtained through the benchmarking introduced in this PR:
As a bonus, here is compared the unit quaternion random implementation from
Eigen
and the one proposed in #105. Note that currentlymanif
still uses the implementation fromEigen
as I don't see a strong motivation to introduce some new code to support for a non critical function. Rather than changingmanif
implementation I'd suggest to propose the change directly upstream toEigen
.