Here's a demonstration and benchmark test I did on allocating to the stack vs. allocating on the heap. I combined both allocation and retrieval into each method for each allocation destination, and the results are below.
Note: There are benefits of each, although for speed, allocation on the...