Closed KristofferC closed 1 year ago
Merging #41 (fff9099) into master (7a7dfa8) will increase coverage by
0.01%
. The diff coverage is100.00%
.
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@ Coverage Diff @@
## master #41 +/- ##
==========================================
+ Coverage 94.43% 94.44% +0.01%
==========================================
Files 15 15
Lines 1671 1675 +4
==========================================
+ Hits 1578 1582 +4
Misses 93 93
Impacted Files | Coverage Δ | |
---|---|---|
src/model.jl | 96.65% <100.00%> (+0.02%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Looking up the index for a single variable is quite expensive since we need to find that variable in a vector. The current method ended up calling
indexin
which is not optimized well for finding a single value since it does quite a bit of expensive stuff under the hood (like creating a dictionary).Instead, in this PR, we precompute a variable => index mapping for all variables which is done via a simple loop and then use that mapping when an index is needed.
This takes the time for solving the FRB-US model (following the tutorial in TutorialsEcon and using the
@btime
macro from BenchmarkTools.jl) fromto