This technical report documents the development of RPDindexOptimized, a separate optimized im- plementation of the six RPD indices previously distributed through the RPDindex research-software repository. The historical implementation is intentionally preserved as the archival reference associ- ated with Zenodo DOI 10.5281/zenodo.20313771. The new implementation preserves the intended numerical semantics for finite Python int/float sequences of length at least two, while reducing the asymptotic complexity of the three global indices from O(n2 ) to O(n log n) by using coordinate compression and Fenwick trees for cumulative counts and sums. A deterministic regression suite performs 52,248 reference-versus-optimized comparisons, and an additional 4,848 checks validate progressive-prefix trajectories. All tests pass within explicit floating-point tolerances; the largest observed absolute discrepancy is approximately 1.11 × 10−15 . A preliminary benchmark confirms the expected computational advantage of the optimized global algorithms as sequence length grows. The new software is independently archived as RPDindexOptimized v1.0.0 with Zenodo DOI 10.5281/zenodo.21892420. The report also documents repository organization, licensing, reproducibility procedures, compatibility limits, and the use of generative artificial intelligence as an assistive software-engineering and drafting tool under the sole author’s responsibility.
Algorithmic Optimization and Regression Validation of the RPD Index Implementation
marco righi
2026
Abstract
This technical report documents the development of RPDindexOptimized, a separate optimized im- plementation of the six RPD indices previously distributed through the RPDindex research-software repository. The historical implementation is intentionally preserved as the archival reference associ- ated with Zenodo DOI 10.5281/zenodo.20313771. The new implementation preserves the intended numerical semantics for finite Python int/float sequences of length at least two, while reducing the asymptotic complexity of the three global indices from O(n2 ) to O(n log n) by using coordinate compression and Fenwick trees for cumulative counts and sums. A deterministic regression suite performs 52,248 reference-versus-optimized comparisons, and an additional 4,848 checks validate progressive-prefix trajectories. All tests pass within explicit floating-point tolerances; the largest observed absolute discrepancy is approximately 1.11 × 10−15 . A preliminary benchmark confirms the expected computational advantage of the optimized global algorithms as sequence length grows. The new software is independently archived as RPDindexOptimized v1.0.0 with Zenodo DOI 10.5281/zenodo.21892420. The report also documents repository organization, licensing, reproducibility procedures, compatibility limits, and the use of generative artificial intelligence as an assistive software-engineering and drafting tool under the sole author’s responsibility.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.


