|
From: | Daniel J Sebald |
Subject: | Re: fftfilt patch |
Date: | Thu, 04 Apr 2013 16:17:17 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16 |
On 04/04/2013 04:00 PM, Daniel J Sebald wrote:
On 04/04/2013 03:24 PM, Jordi Gutiérrez Hermoso wrote:On 4 April 2013 15:18, Daniel J Sebald<address@hidden> wrote:On 04/04/2013 01:30 PM, Rik wrote:Do you have benchmarks for the old and new fftfilt implementation? I see a for loop which is nearly always a bad thing for performance.The for-loop you are referring to was present before the changeset. I was going to bring that up, but then decided it wasn't too critical at the moment.Killing this loop is really easy. The all() function already works columnwise: xisreal = all (imag (x) == 0); xisimag = all (real (x) == 0); I don't really understand the overall algorithm or why you need these two variables, but there you go.Oh, that's nice! Tests pass. Do you want to make the change? Or should I create a changeset?
Or maybe it should be done like in the attached diff file moving that check for xisreal and xisimag inside of the "b is integer" conditional. "b" is almost certainly relatively short. No sense checking all that possible data in x if the outcome isn't going to be used.
Dan
fftfilt_2013apr04_4pm.diff
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |