# About In-line-fft

**URL:** <https://discourse.julialang.org/t/about-in-line-fft/105340>\
**Category:** Performance\
**Tags:** question, fftw\
**Created:** [October 24, 2023, 7:41am UTC](https://discourse.julialang.org/t/about-in-line-fft/105340 "2023-10-24T07:41:20Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [October 24, 2023, 8:22am UTC](https://discourse.julialang.org/t/about-in-line-fft/105340/2 "2023-10-24T08:22:42Z")

</div>

Have you read

[https://docs.julialang.org/en/v1/manual/performance-tips/](https://docs.julialang.org/en/v1/manual/performance-tips/)

?

It seems that you are running your code in global scope, which is terrible for performance and will lead to excessive allocations. Make sure that your code is wrapped in a function when you run it.

Also I’m not a differential equation expert but the references to “Runge-Kutta coefficients” in your code make me suspect that you are rolling your own rk4 implementation here? If that’s the case I would concur with Oscar’s advice in a thread a few weeks ago:

> [@How I can change script for speed up](https://discourse.julialang.org/t/how-i-can-change-script-for-speed-up/104136/3):
>
> don’t roll your own rk4. use an integrated from DifferentialEquations.jl

---

_[View the full topic](https://discourse.julialang.org/t/about-in-line-fft/105340)._
