Skip to content

allocating linearalgebra #72

Description

@rveltz

Hi,

I am surprised by the following behavior. Can you please tell me if this is expected?

Thank you,

Best regards,

using BenchmarkTools

xce0 = ArrayPartition(zeros(2),[0.])
xcde0 = copy(xce0)

function foo(y, x)
	y .= y .+ 2 .* x
end

@btime foo($xcde0, $xce0)

which gives

julia> @btime foo($xcde0, $xce0)
  30.138 ns (3 allocations: 48 bytes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions