# Very best way to concatenate an array of arrays

**URL:** <https://discourse.julialang.org/t/very-best-way-to-concatenate-an-array-of-arrays/8672>\
**Category:** General Usage\
**Tags:** arrays\
**Created:** [January 29, 2018, 3:29pm UTC](https://discourse.julialang.org/t/very-best-way-to-concatenate-an-array-of-arrays/8672 "2018-01-29T15:29:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [January 29, 2018, 3:39pm UTC](https://discourse.julialang.org/t/very-best-way-to-concatenate-an-array-of-arrays/8672/2 "2018-01-29T15:39:42Z")

</div>

> [@ExpandingMan](#):
>
> What is the very best way of doing this?

```julia
using RecursiveArrayTools
VA = VectorOfArray(A)
arr = convert(Array,VA)

```

`VectorOfArray` is a lazy representation of the array of arrays as a higher order tensor (/matrix if `A` is a vector of vectors). It uses the indexing fallback to do the conversion. Honestly, I tried writing my own loop for the conversion but the fallback was faster (Tim Holy Cartesian magic?) so this is what I’ve found to be the fastest, and I don’t know how to recreate it without using the lazy matrix indexing.

---

_[View the full topic](https://discourse.julialang.org/t/very-best-way-to-concatenate-an-array-of-arrays/8672)._
