fast path for dists in the PointMass constraint#145
Merged
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #145 +/- ##
==========================================
+ Coverage 81.22% 81.32% +0.09%
==========================================
Files 11 11
Lines 1209 1210 +1
==========================================
+ Hits 982 984 +2
+ Misses 227 226 -1
☔ View full report in Codecov by Sentry. |
Member
|
Before: BenchmarkTools.Trial: 6 samples with 1 evaluation.
Range (min … max): 929.941 ms … 1.077 s ┊ GC (min … max): 9.92% … 11.26%
Time (median): 957.682 ms ┊ GC (median): 11.08%
Time (mean ± σ): 987.136 ms ± 64.681 ms ┊ GC (mean ± σ): 11.12% ± 0.82%
█ █ █ █ █ █
█▁▁█▁▁▁▁▁▁█▁█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█▁▁▁▁▁█ ▁
930 ms Histogram: frequency by time 1.08 s <
Memory estimate: 528.79 MiB, allocs estimate: 4246814.After BenchmarkTools.Trial: 7 samples with 1 evaluation.
Range (min … max): 668.098 ms … 845.756 ms ┊ GC (min … max): 9.63% … 12.63%
Time (median): 725.226 ms ┊ GC (median): 11.92%
Time (mean ± σ): 739.858 ms ± 55.859 ms ┊ GC (mean ± σ): 11.65% ± 1.28%
█ █ ██ █ █ █
█▁▁▁▁▁▁▁▁▁▁▁▁▁█▁▁▁██▁▁█▁▁▁▁▁▁▁▁▁▁▁▁█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█ ▁
668 ms Histogram: frequency by time 846 ms <
Memory estimate: 485.53 MiB, allocs estimate: 3522721. |
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.
Previously the PointMass form constraint called slow optimization routine for
<: Distributionobjects, even though it is easier and faster to return themodeof the distribution. This PR fixes that. Found by @bartvanerp