Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

💪 add FPCS downsampling algorithm #84

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

💪 add FPCS downsampling algorithm #84

wants to merge 13 commits into from

Conversation

jonasvdd
Copy link
Member

@jonasvdd jonasvdd commented Feb 27, 2025

This PR ports the Feature-Preserving Compensated Sampling algorithm to tsdownsample

https://ieeexplore.ieee.org/document/10669793

DONE:

  • tests for fpcs
  • (compare with vanilla python / rust implementation)
  • Nan handling
  • add test for same behavior for nan- and non-nan aggregators when no nans are present in the data

TODO:

  • .rs tests
  • analyze current fpcs.rs file (and mainly the macro, as I separated the fpcs_inner_comp) function.

@jonasvdd jonasvdd added the enhancement New feature or request label Feb 27, 2025
@jonasvdd jonasvdd requested a review from jvdd February 27, 2025 14:29
Copy link

codspeed-hq bot commented Feb 27, 2025

CodSpeed Performance Report

Merging #84 will degrade performances by 44.98%

Comparing feat/fpcs (499d538) with main (7e2f14a)

Summary

⚡ 17 improvements
❌ 6 regressions
✅ 655 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
test_m4_no_x[True-int32-100-100,000] 520 µs 618.6 µs -15.94%
test_m4_no_x[True-int64-5,000-100,000] 1,070.9 µs 904.9 µs +18.34%
test_m4_with_x[True-float64-1,000-100,000] 1.6 ms 2 ms -20.22%
test_m4_with_x[True-int32-1,000-1,000,000] 3.8 ms 3.4 ms +12.05%
test_m4_with_x[True-int32-1,000-100,000] 1.5 ms 1.9 ms -19.61%
test_m4_with_x[True-int64-1,000-100,000] 1.9 ms 1.6 ms +13.28%
test_minmax_with_x[True-int32-1,000-100,000] 2 ms 1.6 ms +26.32%
test_minmax_with_x[True-int64-1,000-100,000] 3 ms 2.2 ms +33.14%
test_minmaxlttb_no_x[True-float32-5,000-100,000] 2.7 ms 2.3 ms +17.68%
test_nanm4_no_x[True-int32-100-100,000] 645.4 µs 541.7 µs +19.14%
test_nanm4_with_x[True-int32-1,000-100,000] 1.6 ms 1.4 ms +14.21%
test_nanm4_with_x[True-int64-1,000-100,000] 1.9 ms 1.7 ms +14.93%
test_nanminmax_with_x[True-float32-1,000-100,000] 1.5 ms 2.7 ms -44.98%
test_nanminmax_with_x[True-float64-1,000-1,000,000] 6.5 ms 5.8 ms +11.66%
test_nanminmax_with_x[True-float64-1,000-100,000] 2.4 ms 2.1 ms +11.74%
test_nanminmax_with_x[True-int32-1,000-1,000,000] 4.1 ms 3.6 ms +13.56%
test_nanminmax_with_x[True-int32-1,000-100,000] 1.6 ms 2 ms -21.27%
test_nanminmax_with_x[True-int64-5,000-100,000] 5.2 ms 4.7 ms +11.04%
test_nanminmaxlttb_no_x[True-float32-100-100,000] 610.4 µs 459.3 µs +32.9%
test_nanminmaxlttb_no_x[True-float32-5,000-100,000] 2.5 ms 2.3 ms +10.09%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant