Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 23E699693 for ; Thu, 2 Feb 2012 06:38:31 +0000 (UTC) Received: (qmail 47707 invoked by uid 500); 2 Feb 2012 06:38:28 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 46986 invoked by uid 500); 2 Feb 2012 06:38:19 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 46961 invoked by uid 99); 2 Feb 2012 06:38:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 06:38:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2012 06:38:13 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 5BFC718794C for ; Thu, 2 Feb 2012 06:37:53 +0000 (UTC) Date: Thu, 2 Feb 2012 06:37:53 +0000 (UTC) From: =?utf-8?Q?S=C3=A9bastien_Brisard_=28Commented=29_=28JIRA=29?= To: issues@commons.apache.org Message-ID: <1272588478.1490.1328164673378.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <785426659.35234.1326391659832.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (MATH-732) Major Speed Improvement to 1D Discrete Fourier Transform (approximately 5x-9x improvement). Preserved public API 100%. Removed unnecessary use of instance variables and instance state. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MATH-732?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D131985= 61#comment-13198561 ]=20 S=C3=A9bastien Brisard commented on MATH-732: ---------------------------------------- Hi Kurt, I'm willing to have a look to your proposal. As we are trying to release 3.= 0 soon, we need to decide if this issue is postponed to 3.1. I've been work= ing quite a lot on MATH-677, and the patch you provided no longer works. Wo= uld you like to check out the latest version of CM and patch against this v= ersion ? Alternatively (preferably), you could just attach the whole modifi= ed {{FastFourierTransformer}} class, since I will keep both old and new imp= lementations side by side for the sake of my tests. Thanks beforehand, S=C3=A9bastien =20 > Major Speed Improvement to 1D Discrete Fourier Transform (approximately 5= x-9x improvement). Preserved public API 100%. Removed unnecessary use of in= stance variables and instance state. > -------------------------------------------------------------------------= ---------------------------------------------------------------------------= ------------------------------------ > > Key: MATH-732 > URL: https://issues.apache.org/jira/browse/MATH-732 > Project: Commons Math > Issue Type: Improvement > Affects Versions: 3.0 > Reporter: Kurt Ostfeld > Assignee: S=C3=A9bastien Brisard > Labels: api, perfomance > Fix For: 3.0 > > Attachments: DFTPerformanceWithPatch.png, DFTPerformanceWithoutPa= tch.png, FastFourierTransformer.java.diff, FastFourierTransformer.java.diff= , FastFourierTransformerTest.java.diff, FastFourierTransformerTest.java.dif= f, Main.java, Main.java > > > I wrote my own Discrete Fourier Transform function in Java and ran some b= enchmarks and found that it ran dramatically faster than the Apache library= implementation. This is a pretty straight forward implementation of the st= andard Cooley Tukey algorithm that I read out of a textbook. This passes al= l the Apache library test cases plus several I had written on my own. I cre= ated a source code library patch that preserves the public API completely w= hile changing the internal implementation to achieve the performance improv= ement. > In addition to the performance issue, I suggest that Discrete Fourier Tra= nsform functionality be provided as stateless pure functions (in Java this = would be implemented with static methods) just like most other math functio= ns. As-is, the library requires the user to instantiate a Transformer insta= nce which maintains instance state, which is an unecessary complexity for a= pure math function. I held off on this change since it would change the pu= blic API and affect existing code. However, I see similar backward compatab= ility breaking API changes are already in the FastFourierTransformer class = in the 3.0 code base. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira