Skip to content

Improve concordance computation and avoid compiled code#426

Open
vandenman wants to merge 2 commits intojasp-stats:masterfrom
vandenman:concordance
Open

Improve concordance computation and avoid compiled code#426
vandenman wants to merge 2 commits intojasp-stats:masterfrom
vandenman:concordance

Conversation

@vandenman
Copy link
Copy Markdown
Contributor

@vandenman vandenman commented Sep 4, 2025

  • concordance no longer computed via C++ and drops Rcpp as a direct dependency
  • uses an $\mathcal{O}(N\log N)$ algorithm instead of $\mathcal{O}(N^2)$.

See https://refined-github-html-preview.kidonng.workers.dev/vandenman/jaspRegression/raw/8c7f3fae4744ef4aae7a353b0da9e50f18d6d8ef/benchmarks/concordance.html a benchmark.

There are tests, though the quarto benchmark is definitely more extensive.

Inspired by some chats with llms.

@RensDofferhoff I'm not sure who should review this 🤷‍♂️

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.93814% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.94%. Comparing base (ec8a0a0) to head (a0eae8e).

Files with missing lines Patch % Lines
R/concordance.R 97.89% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #426      +/-   ##
==========================================
+ Coverage   75.71%   75.94%   +0.22%     
==========================================
  Files          21       21              
  Lines        8080     8163      +83     
==========================================
+ Hits         6118     6199      +81     
- Misses       1962     1964       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vandenman
Copy link
Copy Markdown
Contributor Author

See https://refined-github-html-preview.kidonng.workers.dev/vandenman/jaspRegression/raw/ce6b51f10f19768fe919da77b45850454b51636b/benchmarks/concordance.html for the new results. Basically the C++ Fenwick approach is always faster than any alternative once N ~ 20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants