Time series distance measures are fundamental in numerous domains, including finance, healthcare, and signal processing, enabling crucial tasks such as pattern recognition, anomaly detection, and predictive modeling. However, many applications require computing distances between all pairs of time series in large datasets, a computationally intensive task that can become a significant bottleneck in analysis pipelines. The tsdistances library is a high-performance Python package designed for computing distances between time series, with GPU support for accelerated processing. This article introduces tsdistances and its key features, focusing on the implementation of elastic distance algorithms and their optimizations. We present both CPU and GPU implementations, highlighting the use of dynamic programming techniques and GPU-specific optimizations such as warp-based parallelization. The performance of tsdistances is compared with existing alternatives in the literature, demonstrating significant speed improvements, especially for large-scale time series analysis tasks.

Algorithm 1061: tsdistances : A High-Performance Python Library for Time Series Distances with GPU Support

Azzari, Alberto;Cracco, Andrea;Masillo, Francesco;Sala, Pietro
2026-01-01

Abstract

Time series distance measures are fundamental in numerous domains, including finance, healthcare, and signal processing, enabling crucial tasks such as pattern recognition, anomaly detection, and predictive modeling. However, many applications require computing distances between all pairs of time series in large datasets, a computationally intensive task that can become a significant bottleneck in analysis pipelines. The tsdistances library is a high-performance Python package designed for computing distances between time series, with GPU support for accelerated processing. This article introduces tsdistances and its key features, focusing on the implementation of elastic distance algorithms and their optimizations. We present both CPU and GPU implementations, highlighting the use of dynamic programming techniques and GPU-specific optimizations such as warp-based parallelization. The performance of tsdistances is compared with existing alternatives in the literature, demonstrating significant speed improvements, especially for large-scale time series analysis tasks.
2026
timeseries, distance measures, dynamic programming, GPU, parallelization
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11562/1192651
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
social impact