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 9259339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:38:05+00:00 2026-06-18T12:38:05+00:00

I spent some time optimizing my algorithm and my quasi-serial (no explicit parralelization) code

  • 0

I spent some time optimizing my algorithm and my quasi-serial (no explicit parralelization) code spends 95% of the time on a line that performs the fftn and dense single(float) matrix multiplication

for k=1:10
    q = q +  x{k}.* fftn( mArray{k}.* ifftn( mOther{k} .* z ) );

I tried adding some wisdoms for the FFT although the performance increase was negligible.

I am at a loss for ways to speed up this code, do you think compiling FFTW could result in a performance increase? I am using Matlab 2012b for a 3rd generation i7.

Edit

I seem to have made a typo, x depends on k, it would have been too easy otherwise. I was hoping somebody could speak to optimizing the actual fft.

    q = q +  x.* fftn( mArray{k}.* ifftn( mOther{k} .* z ) );
    q = q +  x{k}.* fftn( mArray{k}.* ifftn( mOther{k} .* z ) );
  • 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-18T12:38:06+00:00Added an answer on June 18, 2026 at 12:38 pm

    You should add the q’s together before fftn transforming and multiplying by x. e.g.

    A = 0;
    for k=1:10
         A = A + mArray{k}.* ifftn( mOther{k} .* z );
    end
    q = q + x.*fftn(A);
    

    IMO this should be equivalent.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have spent some time learning what are Java Native methods and that they
I had to spent some time in finding and fixing a bug that I
As a new javascript developer, I have spent some time with this code snippit
I just spent some time debugging a problem that boiled down to forgetting to
I have spent some time researching Android's ability to communicate with bluetooth devices that
I've spent some time, but still have to solution. I need regular expression that
I've spent some time searching on the Internet and playing around with my code
Spent some time troubleshooting a problem whereby a PHP/MySQL web application was having problems
I spent some time trying to figure out why this query isn't pulling the
I spent some time looking around, and all I could find is Jython. It's

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.