Skip to content

Would fftw_destroy_plan free the cache in fftw and slow down the creation of plan? #331

@songjhaha

Description

@songjhaha

Here is the MWE:

using FFTW

x = rand(10000_0000)

GC.gc(true); GC.gc(true);

@time p0 = plan_rfft(x); #  3.775467 seconds (3 allocations: 224 bytes)
@time p1 = plan_rfft(x); #  0.003808 seconds (3 allocations: 224 bytes)
@time p2 = plan_rfft(x); #  0.004187 seconds (3 allocations: 224 bytes)

p0, p1, p2 = nothing, nothing, nothing
GC.gc(true); GC.gc(true);

@time plan_rfft(x); # 3.769389 seconds (3 allocations: 224 bytes)

version:

FFTW: 1.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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