Firionus / FastRunningMedian.jl

Efficient running median for Julia
MIT License
11 stars 1 forks source link

Add fast implementation for small window sizes #2

Open Firionus opened 4 years ago

Firionus commented 4 years ago

See the R/C implementation of runmed for reference

The Stuetzle implementation for small windows can be found at https://github.com/SurajGupta/r-source/blob/a28e609e72ed7c47f6ddfbb86c85279a0750f0b7/src/library/stats/src/Srunmed.c

ToDo

Firionus commented 2 years ago

Or could it be an option to call into SortFilters for small window sizes?

This definitely needs a new round of benchmarks, maybe even in CI.

Firionus commented 1 year ago

Or could it be an option to call into SortFilters for small window sizes?

This definitely needs a new round of benchmarks, maybe even in CI.

The initial implementation for rolling with odd window size with pivot counting (benchmarks and code private right now) is more than twice as fast as SortFilters. Calling into SortFilters does not seem like a good idea.