# 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\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sakrejda](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/sakrejda/32/845_2.png) [@sakrejda](https://discourse.mc-stan.org/u/sakrejda)\
**Post date:** [October 7, 2017, 11:20am UTC](https://discourse.mc-stan.org/t/efficient-static-matrix-type/2136/2 "2017-10-07T11:20:46Z")

</div>

This is neat, when Justin and I were talking about the autodiff we thought the original approach to avoiding copying was pretty clever. I think I understand but let me check: Does the efficiency problem you’re trying to avoid come from not having the doubles from the ‘vari’ objects inside the matrix all next to each other in memory?

---

_[View the full topic](https://discourse.mc-stan.org/t/efficient-static-matrix-type/2136)._
