Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4207 +/- ##
==========================================
+ Coverage 99.95% 99.96% +0.01%
==========================================
Files 43 43
Lines 6306 6313 +7
==========================================
+ Hits 6303 6311 +8
+ Misses 3 2 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
blegat
reviewed
Jul 27, 2026
blegat
reviewed
Jul 27, 2026
|
|
||
| Base.get(cache::_WeakCache, key, default) = get(cache.data, key, default) | ||
|
|
||
| Base.getindex(cache::_WeakCache, key) = getindex(cache.data, WeakRef(key)) |
Member
Author
There was a problem hiding this comment.
It was used in the tests to simplify things. I guess I can remove.
Member
Author
|
I think I'm just re-implementing |
blegat
approved these changes
Jul 30, 2026
blegat
reviewed
Jul 30, 2026
|
|
||
| julia> @allocated @expression(model, @force_nonlinear(x * 2.0 * (1 + x) * x)) | ||
| 944 | ||
| 784 |
Member
There was a problem hiding this comment.
Surprising that this decreases when we change struct to mutable struct
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A variant of #4204 that closes #4203
The downside to this approach is that we need to decide how frequently to filter the subexpression dictionary. If an element has been GC'd, it cannot be referenced in the future, so it is safe to remove.