I have an early but complete and working (fairly well) version of a set of routines for analyzing ECG signals for the heart rate. It is mostly based on a popular technique called Pan/Tompkins (published in 1985 that operated on an 8-bit Z80 micropressor), but with some tweaks that I have been playing with (filters implemented using complex 64-bit math, a 256 channel filter bank, median filters, etc.). This is a work (actually hobby) in progress, but I have implemented my current versions in Matlab and Julia. The Julia version runs on both my (fairly old) desktop, and on a Raspberry Pi-4. Currently, I am mostly analyzing data from the MIT database at MIT-BIH Arrhythmia Database Directory; these are sampled at 360S/s but I change all my data samples to be 250S/s so I don’t have to change algorithms for different data bases. For a non-optimized example of 30 minutes (451389 samples to be exact), I get:
Matlab: ~54s, Julia (desktop): 2.7s to 3.0s (using @time, Benchmark Tools says 2.6s), Julia (Pi-4): 10.5-12s. The algorithms have not been optimized (well just a little by having the inner loop operate on columns); the filters are mostly IIR which might favor Julia as FIR would be more matrix multiplication based (which I believe Matlab does in C). Still, the numbers are interesting. I would guess the Pi would do better if it used 32-bit floating point rather than 64-bit (I think 64 bit OS’s for the Pi are coming soon or are almost here). Even so, it is seen the Pi can easily handle a large number of ECG signals with very non-optimized algorithms in real time, with plenty of time left over (i.e. 150 times faster than necessary for a single signal). I think running Julia on a Pi-4 might have many interesting real world applications. I might also mention that BenchmarkTools can be added but don’t work on the Pi-4 so I used @time rather than @btime.
I might also add that I find Matlab easier for debugging which algorithms work and which don’t work and why (mostly because functions with breakpoints can be called at breakpoints), but that it is too slow to look at many different ECG signals in a short time; Julia is very good for this. Using each language where it is best might be a good approach.