Skip to content

Commit 5f83277

Browse files
authored
Update README.md (#28)
1 parent 955e0a1 commit 5f83277

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,17 @@ x = collect(x_a)
3535
y = simplify.(fft(x))
3636
```
3737
Now, if you have a signal afterward that you want to substitute in, you can call `map(y_el -> substitute(y_el, Dict(x .=> signal)), y)`. Make no mistake-- it's almost certainly more efficient to just plug your type into `FFTA.fft` than using substitution. But this is an example of how `FFTA` integrates wonderfully and gracefully with the Julia ecosystem. If you want high precision FFTs, use `Complex{BigFloat}`. If you want to use an `SVector` from `StaticArrays` because your data is small, then use that! If you want to use `SizedArray{Complex{BigFloat}}`, be my guest. These are opportunities that won't be provided to you in almost any other package out there.
38+
39+
As of this commit, you can do
40+
```julia
41+
julia> import FFTA, FFTW
42+
43+
julia> N = 64
44+
45+
julia> @btime FFTA.fft(x) setup=(x = @SVector rand(N));
46+
698.611 ns (8 allocations: 2.11 KiB)
47+
48+
julia> @btime FFTW.fft(x) setup=(x = @SVector rand(N));
49+
5.433 μs (34 allocations: 4.70 KiB)
50+
```
51+
It's painfully obvious that this example is cherry-picked. Nonetheless, the user can finally take the speedups so much of the Julia community has worked so hard on and propogate them into the FFT.

0 commit comments

Comments
 (0)