Efficient Time-Series Heart Rate Variability Metrics in C++
Journal
2025 MIPRO 48th ICT and Electronics Convention
Date Issued
2025-06-02
Author(s)
Shekerov, A.
Angjelevska, A.
DOI
10.1109/mipro65660.2025.11132034
Abstract
Time-Series Heart Rate Variability is an essential set of metrics in modern medicine and cardiology. Algorithms for HRV calculations exhibit quadratic time complexity in the worst cases, as metrics are calculated at many pre-defined time intervals with different widths and offsets, especially for patients with potentially week-long recordings. In this paper, we aim to develop an efficient software solution for electrocardiograms from wearable sensors, which requires careful preprocessing and filtering steps to eliminate noise and erroneous values, detect heartbeats, and classify arrhythmia. This paper describes the utilized method and presents an efficient C++ implementation. We evaluate efficiency by comparing the new solution with the existing Python implementation and conclude that the new implementation performs exceptionally better, with a median speedup of 81.4 for single-day patient recordings and an average speedup of 11.9 for multi-day patient recordings. The results are presented for an extensive set of preprocessed patient databases, discussing the benefits and drawbacks.
