Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

perf: check mutability of array before preallocating dual buffer #619

Merged
merged 2 commits into from
Nov 10, 2024

Conversation

gdalle
Copy link
Member

@gdalle gdalle commented Nov 10, 2024

DI source

  • Define ismutable_array which returns true by default.

DI extensions

  • StaticArrays: overload ismutable_array to return false on SArray
  • ForwardDiff: check ismutable_array before preallocating the buffer of Dual numbers in one-argument pushforward

DI tests

  • ForwardDiff: Add allocation benchmarks for static scenarios. All allocation-free except hessian and pullback

Chores

  • Bump DI to v0.6.23

Copy link

codecov bot commented Nov 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.72%. Comparing base (9a524d3) to head (ceeb19c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #619   +/-   ##
=======================================
  Coverage   97.71%   97.72%           
=======================================
  Files         112      112           
  Lines        5522     5530    +8     
=======================================
+ Hits         5396     5404    +8     
  Misses        126      126           
Flag Coverage Δ
DI 98.95% <100.00%> (+<0.01%) ⬆️
DIT 95.35% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@gdalle gdalle merged commit d537c45 into main Nov 10, 2024
47 checks passed
@gdalle gdalle deleted the gd/mutable branch November 10, 2024 08:12
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.

1 participant