Performance characterization (operation-count proxy)
June 5, 2026 · View on GitHub
Counts of SCL-level operations per RuckigOtg update, measured by
hooking the plc-code executor (FC-dispatch + math.sqrt). These are a
relative cost proxy (not microseconds) for hot-path ranking and the
steady-state vs recompute split. Real cycle-time is measured on PLCSIM
Advanced (see benchmark/README.md).
Per-cycle cost
| Scenario | recompute: FC calls | recompute: sqrt | steady: FC calls | steady: sqrt |
|---|---|---|---|---|
| 1-DoF position | 44 | 21 | 9 | 0 |
| 2-DoF position | 240 | 97 | 16 | 0 |
| 4-DoF position | 368 | 150 | 30 | 0 |
| 4-DoF velocity | 55 | 4 | 26 | 0 |
Hot-path ranking (4-DoF position recompute, FC calls)
PolyEval: 75IntegrateProfileStates: 56CheckProfile: 52SolveQuartic: 39SolveCubic: 28IsFiniteLreal: 24SolveDirection: 8SolveTimedAcc0Acc1Vel: 8SolveTimedVel: 8SolveTimedAcc0Vel: 8SolveTimedAcc1Vel: 8SolveTimedAcc0Acc1: 8SolveTimedAcc0: 8SolveTimedAcc1: 8SolveTimedNone: 8ComputeBrakeProfile: 4ComputeBlock1Axis: 4ComputeProfile1AxisTimed: 4StateAtTime: 4ShrinkInterval: 3ValidateInput: 1Synchronize: 1AdvanceTime: 1
Notes
- Steady-state (no retarget) is the common cycle: 0 sqrt, a small fixed
FC count (per-axis
StateAtTime+AdvanceTime+ input validation). - Recompute (a retarget cycle) is the worst case: per-axis brake + Block +
Synchronize+ step2; the root solvers (PolyEval/SolveQuartic/SolveCubic/CheckProfile) dominate. - Optimization is deferred to a later, measurement-driven version (this report is the 'measure first' step); real µs come from PLCSIM.