News for hackers. Stuff that matters.
Re:Grassmann.jl A\b 3x faster than Julia's StaticArrays.jl by marmaduke on Monday June 15, 2020 @02:28PM (#23531105)
So the real question is why a library with the word "static" in its title does 30 thousand allocations..
Re:Grassmann.jl A\b 3x faster than Julia's StaticArrays.jl by dnautics on Monday June 15, 2020 @03:06PM (#23531599)
I believe the "static" refers to static, aka, compile-time dimension of the array (yes, julia is a compiling language), versus an array that has a run-time, mutable array dimensionality.
Re:Grassmann.jl A\b 3x faster than Julia's StaticArrays.jl by ChrisFoster on Monday June 15, 2020 @07:13PM (#23534180)
"Static" is a reference to the size of the arrays being fixed and encoded in the type. There's various allocation strategies, for instance StaticArrays.SizedArray uses a normal heap-allocated Array as the storage.

That said, the backing storage for the particular static array types used in this example (SMatrix,SVector) is an immutable Tuple which should generally be stack allocated if the library and optimizer are working together as intended. So the allocations here are a bit of a surprise; they may indicate a lack of inlining in something we expected to be inlined.

Re:Grassmann.jl A\b 3x faster than Julia's StaticArrays.jl by tkoolen on Monday June 15, 2020 @09:15PM (#23534955)
1) a mistake in the benchmark procedure explained in https://discourse.julialang.org/t/grassmann-jl-a-b-3x-faster..., and 2) the dynamically-sized result vector containing 10000 statically-sized 5-vectors still needs to be allocated.