bionanoimaging / FourierTools.jl

Tools for working with Fourier space.
https://bionanoimaging.github.io/FourierTools.jl/stable/
MIT License
56 stars 6 forks source link

Runtime dispatch with `ft_fix_before` #29

Closed roflmaostc closed 1 year ago

roflmaostc commented 1 year ago

Hi,

@RainerHeintzmann there is a couple of runtime dispatches because of type-instability.

See this: https://github.com/bionanoimaging/FourierTools.jl/blob/000735e46a7deb17a71c69ae701508a59dd85108/src/fourier_resizing.jl#L147

I think you probably should always return the FourierJoin type, otherwise it can't handle it.

This causes actually some issues with slow packaging loading times.

roflmaostc commented 1 year ago

This affects also rft_pad, rft_fix_after.

roflmaostc commented 1 year ago

I used this tool: https://aviatesk.github.io/JET.jl/stable/tutorial/

@report_opt ignored_modules=(AnyFrameModule(Base),) resample(x, (2,2))
RainerHeintzmann commented 1 year ago

Ok. Will see if I can fix this.

roflmaostc commented 1 year ago

fixed by #30