Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9119951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:31:04+00:00 2026-06-17T05:31:04+00:00

Topic question: how fast is Kiss FFT in big O notation? I can’t find

  • 0

Topic question: how fast is Kiss FFT in big O notation? I can’t find this stated anywhere, it’s probably somewhere obvious and I’m just blind.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:31:05+00:00Added an answer on June 17, 2026 at 5:31 am

    I’m pretty sure the point of a Fast Fourier Transform is that it’s θ(n log n).
    If it’s anything slower then it wouldn’t be called a “Fast” Fourier Transform.
    (And it’s probably not faster.)


    Speaking of “simple” FFTs, here’s one (powers of 2 only):

    // To get the discrete Fourier _series_, divide by the period
    template<class RanInIt, class RanOutIt, class RanScratchIt>
    void fft(RanInIt begin, RanInIt end,
        RanOutIt outputs, RanScratchIt scratch /* at least twice as big as output */,
        bool const inverse = false, size_t const stride = 1)
    {
        typedef std::iterator_traits<RanInIt>::value_type complex;
        static long double const two_pi = 6.2831853071795864769252867665590057683943L;
        size_t const n = 1 + static_cast<size_t>(std::distance(begin, end) - 1) / stride;
        if ((n & (n - 1)) != 0) { throw std::logic_error("FFTs must be in powers of 2!"); }
        complex const divisor(inverse ? n : 1);
        if (n > 2)
        {
            fft(begin + 0 * stride, end, scratch + 0 * stride, outputs + 0 * stride, false, 2 * stride);
            fft(begin + 1 * stride, end, scratch + 1 * stride, outputs + 1 * stride, false, 2 * stride);
            size_t const n_2 = n / 2;
            for (size_t i = 0; i < n_2; i++)
            {
                using std::polar;
                complex const
                    t(polar(1.0L, -two_pi * i / n)),
                    s  (*(scratch + (2 * i + 0) * stride)),
                    psi(*(scratch + (2 * i + 1) * stride) * t);
                *(outputs + ((i +   0) * stride)) = (s + psi) / divisor;
                *(outputs + ((i + n_2) * stride)) = (s - psi) / divisor;
            }
        }
        else if (n > 0)
        {
            *(outputs + (0 * stride)) = (*begin + *(begin + 1 * stride)) / divisor;
            *(outputs + (1 * stride)) = (*begin - *(begin + 1 * stride)) / divisor;
        }
        if (inverse)
        {
            std::swap_ranges(outputs + 1, outputs + n / 2, std::reverse_iterator<RanOutIt>(outputs + n));
        }
    }
    
    template<class RanInIt>
    std::vector<typename std::iterator_traits<RanInIt>::value_type>
        fft(RanInIt begin, RanInIt end, bool const inverse = false)
    {
        size_t const n = static_cast<size_t>(std::distance(begin, end));
        size_t log2ceil_n = 0;
        for (size_t i = 1; i < n; i *= 2) { log2ceil_n++; }
        std::vector<typename std::iterator_traits<RanInIt>::value_type>
            outputs(static_cast<size_t>(1) << log2ceil_n),
            scratch(2 * outputs.size());
        fft(begin, end, outputs.begin(), scratch.begin(), inverse);
        outputs.resize(n);
        return outputs;
    }
    
    template<class Range>
    std::vector<typename Range::value_type> fft(Range range, bool const inverse = false)
    { return fft(range.begin(), range.end(), inverse); }
    
    template<class T, size_t N>
    std::vector<T> fft(T const (&range)[N], bool const inverse = false)
    { return fft(&range[0], &range[N], inverse); }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Probably a bit off topic question, but it's something I'm really interested in getting
There are many question regarding this topic but there is no clear answer. Although
There are actually 2 question i want to cover in this topic. 1) Is
I asked a question about Garbage Collection in Java in this topic . But
I'm new to this topic so sorry if this is a stupid question :\
The title is my question. I already found a topic related to this here
I have tried looking though several of the already asked question about this topic
I also posted this question on the Google Group https://groups.google.com/forum/?fromgroups#!topic/d3-js/DYiVeC544ws , but saw that
All, there are many question on the above topic but I believe this is
My colleague wrote the following stackoverflow question: other stack overflow question on this topic

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.