# \[Case-study preview\] Speeding up Stan by reducing redundant computation

**URL:** <https://discourse.mc-stan.org/t/case-study-preview-speeding-up-stan-by-reducing-redundant-computation/14228>\
**Category:** Publicity\
**Tags:** performance\
**Created:** [April 10, 2020, 5:12pm UTC](https://discourse.mc-stan.org/t/case-study-preview-speeding-up-stan-by-reducing-redundant-computation/14228 "2020-04-10T17:12:13Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mike-lawrence](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/mike-lawrence/32/59_2.png) [@mike-lawrence](https://discourse.mc-stan.org/u/mike-lawrence)\
**Post date:** [April 15, 2020, 12:06am UTC](https://discourse.mc-stan.org/t/case-study-preview-speeding-up-stan-by-reducing-redundant-computation/14228/2 "2020-04-15T00:06:03Z")

</div>

Just had a thought while procrastinating on the prose: design matrices tend to have high regularity within columns (ex. intercept column, effect columns where entries are simply `*-1` of each other) so I wonder if that regularity could be used to further reduce computation, or whether `dot_product()` is already super optimized that breaking it apart and doing the sums explicitly would just slow things down.

---

_[View the full topic](https://discourse.mc-stan.org/t/case-study-preview-speeding-up-stan-by-reducing-redundant-computation/14228)._
