Quantcast
Channel: First steps - JuliaLang
Viewing all articles
Browse latest Browse all 2795

Performance disadvantages of structs?

$
0
0

Hello,
I have a lot of large arrays (matrices of floats, vectors of floats, vectors of StaticArrays of floats, vectors of StaticArrays of ints) in my code and calling functions is becoming cumbersome, as I have way too many parameters.
Are there any disadvantages, performance-wise in putting these large mutable arrays into a single struct and passing the struct to functions?
Not all functions need all the arrays, in case that matters.

Also, within the function, if I want to give the struct variable an alias, say b=a.b. Is there a good way to do that while avoiding allocations?
Thanks!

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 2795

Trending Articles