Skip to content

Weird behavior of LinearAlgebra.mul! for Double64 #194

@photor

Description

@photor
using DoubleFloats, BenchmarkTools, LinearAlgebra

const n=1000
A=randn(Double64,n,n)
B=randn(Double64,n,n)
C=zeros(Double64,n,n)

@btime mul!($C,$A,$B);

gives

21.144 s (0 allocations: 0 bytes)

while

@btime mul!($C,$A,$B,true,false);

gives

13.402 s (3 allocations: 29.81 KiB)

Shouldn't mul!(C,A,B) be realized as mul!(C,A,B,true,false)? And why is the difference in performance and allocations?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions