Skip to content

Potentially suboptimal performance in r2r transforms? #189

@jishnub

Description

@jishnub

Currently, the Chebyshev plans internally use FFTW.r2r plans, eg.

function plan_chebyshevtransform(x::AbstractArray{T,N}, ::Val{1}, dims...; kws...) where {T<:fftwNumber,N}
if isempty(x)
ChebyshevTransformPlan{T,1,kindtuple(FIRSTKIND,N,dims...),false,N,isempty(dims) ? UnitRange{Int} : typeof(dims)}()
else
ChebyshevTransformPlan{T,1,kindtuple(FIRSTKIND,N,dims...)}(FFTW.plan_r2r(x, FIRSTKIND, dims...; kws...))
end
end

However, from what I understand after reading Steven G. Johnson's post on discourse, the r2r transforms are not as optimized as the r2c ones, and are not recommended over the alternatives. I wonder if a rewrite of the r2r transforms (here or elsewhere) might improve performance?

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