Skip to content

add coccinelle rule for accessor calls in loops - #7959

Open
m-muecke wants to merge 3 commits into
masterfrom
cocci-hoist-accessors
Open

m-muecke wants to merge 3 commits into
masterfrom
cocci-hoist-accessors

Conversation

@m-muecke

Copy link
Copy Markdown
Contributor

I've narrowed it down as much as possible. Relates to #7930

@codecov

codecov Bot commented Dec 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.04950% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.87%. Comparing base (63a95fa) to head (bd0692f).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
src/ijoin.c 91.42% 9 Missing ⚠️
src/assign.c 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7959      +/-   ##
==========================================
- Coverage   99.08%   96.87%   -2.22%     
==========================================
  Files          88       87       -1     
  Lines       17428    17514      +86     
==========================================
- Hits        17269    16967     -302     
- Misses        159      547     +388     

☔ View full report in Codecov by Harness.
📢 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.

@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown
  • HEAD=cocci-hoist-accessors much slower for transform improved in #5493
  • HEAD=cocci-hoist-accessors much slower for as.data.table.array improved in #7019
  • HEAD=cocci-hoist-accessors faster P<0.001 for melt improved in #5054

Comparison Plot

Generated via commit bd0692f

Download link for the artifact containing the test results: ↓ atime-results.zip

Task Duration
R setup and installing dependencies 1 minutes and 49 seconds
Installing different package versions 15 minutes and 0 seconds
Running and plotting the test cases 5 minutes and 47 seconds

@jangorecki

jangorecki commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Taking out macros from loops feels like a never ending task for our codebase.
Does this PR eliminates it all?

What would be nice to see is performance impact.
Some of those loops will be running for:

  • each column - gains are most likely not noticeable
  • each group - makes difference for high cardinality columns
  • each row - those should have been already replaced long time ago.

Could we have a small benchmark of the biggest gainer from this PR?

This branch has not been deployed

No deployments
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