| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…oilerplate Reworks the ad hoc, partly-commented-out timing script (which had been manually re-enabled with a couple of tweaks, uncommitted, sitting in the working tree across several perf PRs this session) into something that's actually a useful reference: - Split into separate tables, one per category (SO(3)/SE(3) base functions, SE3 class, quaternion base functions, UnitQuaternion class, twist/exponential-map base functions, Twist3 class, NumPy baseline), printed with a plain header between each. Base-level (module functions on raw arrays) and class-level (constructors/ operators/properties on instances) are now consistently separated throughout, rather than mixed together - the old Twist3 section in particular had base functions (skew, trlog, trexp, rodrigues, ...) interleaved with class-level operations. - Fixed a corrupted docstring header left over from a bad find/replace on upstream (`# -*- coding", t)` / `@author", t)`), unrelated to any of this but noticed while rewriting the file. - Fixed mislabelled/ambiguous rows: `inner()` -> `np.inner(s, s).sum()`, bare `cross()` -> `base.cross(a, b)` (paired explicitly against `np.cross(a, b)`), and rows comparing decomposed-(R,t) vs full-4x4 composition that had identical labels for different code paths. - Added coverage that didn't exist before: SE3 <-> RPY, SE3 <-> Euler, SE3 -> UnitQuaternion, UnitQuaternion <-> rotation matrix, UnitQuaternion -> SE3, and SE3 @ SE3 (normalized compose) alongside SE3 * SE3. - Collapsed the `timeit.timeit(...); result(...)` two-line-per-test boilerplate into a single `timeit(stmt, label, setup)` call (module import aliased to `_timeit` to free up the name). Replaced the single `timeit.timeit(..., number=N)` run per test with `min(timeit.repeat(..., number=N, repeat=REPEATS))` - a single long run doesn't distinguish real cost from a GC pause or OS scheduling hiccup, min-of-repeats does. N dropped from 100_000 to 10_000 (an arbitrary starting point either way) since the repeats now do the work of suppressing noise that a bigger N was being used for. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The script is a dev tool, not library API; move it out of the installed package so it no longer ships in the wheel. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
CPU, OS, Python, numpy and spatialmath versions and the timing settings, so a pasted table is self-describing. Modeled on RTB's rne_speed.py. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
⚠️ Please install the Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Reworks the ad hoc micro-benchmark script (spatialmath/timing.py) into something useful as a reference. Three commits, best reviewed one at a time:
Run with python benchmarks/benchmark_smtb.py. Checked on Python 3.14 / macOS (Apple M1).
🤖 Generated with Claude Code