# Runtime improvement to FHorz agent distribution iteration with semi-exogenous state

**URL:** https://discourse.vfitoolkit.com/t/runtime-improvement-to-fhorz-agent-distribution-iteration-with-semi-exogenous-state/635
**Category:** Uncategorized
**Created:** [April 9, 2026, 1:25am UTC](https://discourse.vfitoolkit.com/t/runtime-improvement-to-fhorz-agent-distribution-iteration-with-semi-exogenous-state/635 "2026-04-09T01:25:38Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![robertdkirkby](https://discourse.vfitoolkit.com/user_avatar/discourse.vfitoolkit.com/robertdkirkby/32/287_2.png) [@robertdkirkby](https://discourse.vfitoolkit.com/u/robertdkirkby)
#### Post date: [April 9, 2026, 3:42am UTC](https://discourse.vfitoolkit.com/t/runtime-improvement-to-fhorz-agent-distribution-iteration-with-semi-exogenous-state/635/3 "2026-04-09T03:42:20Z")

</div>

Turns out it was easy to roll out everywhere, only took an hour or two. So now all done 😃

> <https://github.com/vfitoolkit/VFIToolkit-matlab/commit/819dcc4835a306e089615800a9e99e0e721e5ab8>

Note: for models where pi\_semiz is dense (no zeros), this new approach is fractionally slower (say 1-3% slower), but I think that is worthwhile for the large speed gains when there are lots of zeros.

---

_[View the full topic](https://discourse.vfitoolkit.com/t/runtime-improvement-to-fhorz-agent-distribution-iteration-with-semi-exogenous-state/635)._
