Skip to content

Commit 0de3197

Browse files
committed
Mention that unflatten + evaluate!! is still faster
1 parent c3df6aa commit 0de3197

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

developers/models/varinfo-overview/index.qmd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ We can then directly use `v_new` in `evaluate!!`, which will use the value `7.0`
226226
retval, vout = DynamicPPL.evaluate!!(model, v_unflattened)
227227
```
228228

229-
**There are several reasons why this function is dangerous.
229+
Even the combination of `unflatten` and `evaluate!!` tends to be faster than a single call to `init!!`, especially for larger models.
230+
231+
**However, there are several reasons why this function is dangerous.
230232
If you use it, you must pay close attention to correctness:**
231233

232234
1. For models with multiple variables, the order in which these variables occur in the vector is not obvious. The short answer is that it depends on the order in which the variables are added to the VarInfo during its initialisation. If you have models where the order of variables can vary from one execution to another, then `unflatten` can easily lead to incorrect results.

0 commit comments

Comments
 (0)