# Grassmann.jl A\\b 3x faster than Julia's StaticArrays.jl

**URL:** <https://discourse.julialang.org/t/grassmann-jl-a-b-3x-faster-than-julias-staticarrays-jl/41451>\
**Category:** Performance\
**Tags:** package, announcement, array\
**Created:** [June 15, 2020, 4:12pm UTC](https://discourse.julialang.org/t/grassmann-jl-a-b-3x-faster-than-julias-staticarrays-jl/41451 "2020-06-15T16:12:53Z")\
**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:** [June 15, 2020, 11:46pm UTC](https://discourse.julialang.org/t/grassmann-jl-a-b-3x-faster-than-julias-staticarrays-jl/41451/2 "2020-06-15T23:46:40Z")

</div>

> [@chakravala](#):
>
> `@btime $(rand(SMatrix{5,5},10000)).\Ref($(SVector(1,2,3,4,5)));`

That’s not type-stable. `x = [@SMatrix randn(5,5) for i in 1:10000]` is a type stable way to compute an array of random SMatrices, and that nearly doubles the speed of the computation and removes the allocations down to 2, i.e. from:

```julia
2.549 ms (29496 allocations: 1.44 MiB)

```

to

```julia
1.469 ms (2 allocations: 390.70 KiB)

```

for me. Still a nice performance for Grassmann.jl, but seems to be \<2x.

---

_[View the full topic](https://discourse.julialang.org/t/grassmann-jl-a-b-3x-faster-than-julias-staticarrays-jl/41451)._
