# Max size for SVector or SArray

**URL:** <https://discourse.julialang.org/t/max-size-for-svector-or-sarray/95209>\
**Category:** General Usage\
**Created:** [February 25, 2023, 10:50pm UTC](https://discourse.julialang.org/t/max-size-for-svector-or-sarray/95209 "2023-02-25T22:50:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![prittjam](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/prittjam/32/21267_2.png) [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Post date:** [February 25, 2023, 10:50pm UTC](https://discourse.julialang.org/t/max-size-for-svector-or-sarray/95209/1 "2023-02-25T22:50:20Z")

</div>

What are the recommended maximum sizes for an SVector or SArray? I realize there is no hard limit, but are there some rules of thumb?

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [February 25, 2023, 10:52pm UTC](https://discourse.julialang.org/t/max-size-for-svector-or-sarray/95209/2 "2023-02-25T22:52:05Z")

</div>

probably shouldn’t be used beyond 100 elements but you always need to benchmark your exact use case and your machine for precise cut off

---

<div class="post-metadata">

**Author:** ![prittjam](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/prittjam/32/21267_2.png) [@prittjam](https://discourse.julialang.org/u/prittjam)\
**Post date:** [February 25, 2023, 11:01pm UTC](https://discourse.julialang.org/t/max-size-for-svector-or-sarray/95209/3 "2023-02-25T23:01:39Z")

</div>

so for SArray it would be 100x100? and then for SVector, presumably 100,000 would be ok? And I guess this also is a function of the precision, e.g., Float64?

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [February 25, 2023, 11:15pm UTC](https://discourse.julialang.org/t/max-size-for-svector-or-sarray/95209/4 "2023-02-25T23:15:16Z")

</div>

Can’t retrieve the post now, but when I did try I remember there were a certain number that up to thst point, it was fast, and after that number of elements, it were needed to kill the julia process… so, try by yourself in your specific architecture…

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [February 25, 2023, 11:44pm UTC](https://discourse.julialang.org/t/max-size-for-svector-or-sarray/95209/5 "2023-02-25T23:44:17Z")

</div>

> [@prittjam](#):
>
> for SArray it would be 100x100? and then for SVector, presumably 100,000 would be ok?

No, the rule of thumb is 100, not 100x100. That’s up to 10x10.
