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). |
joansola
left a comment
There was a problem hiding this comment.
OK I already had a look to all this some time ago, I approve right away
SE2Tangent::rjacinv/ljacinvSE_2_3Tangent::rjacinv/ljacinvThis 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
averageunit 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
Eigenand the one proposed in #105. Note that currentlymanifstill uses the implementation fromEigenas I don't see a strong motivation to introduce some new code to support for a non critical function. Rather than changingmanifimplementation I'd suggest to propose the change directly upstream toEigen.