The user manual at Performance Tips · The Julia Language suggests that we avoid types with values as parameters. However, doesn’t the base Array{T, N}
have a value-parameter N
? How can Base get away with this but have good performance?
My thoughts were that it’s either
-
N
is an Int, which is an isbits type? - or because the
Array
struct is defined in C (according to https://github.com/JuliaLang/julia/blob/master/base/boot.jl), which means it can defy performance guidelines?
Also, I had a hard time tracking down the C source for the Array{T, N}
type. Looked in src/array.c
, but didn’t find anything obvious to myself, an outsider to Julia source. Would be interested if someone can provide a pointer to understand where this type is defined.
Thank you!