# Efficient static\_matrix type?

**URL:** <https://discourse.mc-stan.org/t/efficient-static-matrix-type/2136>\
**Category:** General\
**Tags:** matrix, autodiff\
**Created:** [October 6, 2017, 4:23pm UTC](https://discourse.mc-stan.org/t/efficient-static-matrix-type/2136 "2017-10-06T16:23:13Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![Bob\_Carpenter](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/bob_carpenter/32/9230_2.png) [@Bob\_Carpenter](https://discourse.mc-stan.org/u/Bob_Carpenter)\
**Post date:** [November 22, 2018, 3:20am UTC](https://discourse.mc-stan.org/t/efficient-static-matrix-type/2136/21 "2018-11-22T03:20:10Z")

</div>

> [@stevebronder](#):
>
> A large part of the transfer’s cost is in using `value_of_rec()` to pull out the var’s value. A view to get the value out would be v nice.

Indeed. This pretty much comes up whenever anyone looks at AD (Rob Trangucci being the last person to try to push on this). I [had a proposal on Discourse](https://discourse.mc-stan.org/t/a-new-continuation-based-autodiff-by-refactoring/5037) a while back on how we could completely rebuild AD to do this. I don’t know how to do it with our current autodiff.

[Previous page](https://discourse.mc-stan.org/t/efficient-static-matrix-type/2136.md?page=1)
