Skip to content

Interpolations.gradient is not allocation free under Julia v1.11 #610

Open
@lmh91

Description

@lmh91

Interpolations.gradient causes some allocations under Julia v1.11 whereas under Julia v1.10 it does not.
Resulting in also some significant performance drop.

MWE:

using BenchmarkTools
using Interpolations

itp = interpolate(rand(11, 11), BSpline(Cubic()))
x, y = 3.4, 5.3

@btime Interpolations.gradient($itp, $x, $y)

Julia v1.10: 18.136 ns (0 allocations: 0 bytes)

Julia v1.11: 118.716 ns (8 allocations: 384 bytes)

I am not sure if this actually bolongs here or to some dependency or Julia itself.

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