Skip to content

Performance bug in compiling functions #937

Open
@laurentbartholdi

Description

@laurentbartholdi

With Julia 1.7 and the StaticArrays v0.12.5:

julia> N = 14; m = SMatrix{N,N}(rand(N,N));

julia> x->x*m # works fine
#1 (generic function with 1 method)

julia> @time [x->x*g for g∈[m]]
  3.018892 seconds (57.49 k allocations: 3.383 MiB, 100.06% compilation time)
1-element Vector{var"#20#22"{SMatrix{14, 14, Float64, 196}}}:
 #20 (generic function with 1 method)

Why does it take 3 seconds? It seems to scale horribly, too: for N=10, I get 0.449260 seconds; for N=15, 5.230108 seconds; for N=16, 9.209356 seconds.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions