Best unofficial Apache Server developers community
Username
Forgot password?
Sign in with Twitter account
Sign in with Facebook account
List archives

Major speed improvement to 1D FFT (MATH-732)

: Project commons-proxy-test (in module apache-commons) failed
(46 lines)
Re: Conversion utility class
(15 lines)
Feb 7, 2012
Sébastien Brisard
Sébastien Brisard
Hi,
Kurt has recently proposed a patch for 1D-FFT which is much faster
than our current impl, while still passing the tests (of course).
Am I likely to hurt anyone's feelings if I replace the old impl by the new
impl?

Also, I think that one of the reasons why our previous implementation
was so slow is because it used internally Complex objects. Since these
objects are immutable, we end up creating *a lot* of small objects.
Apparently, the GC and JIT are not so good at that ;) (not being an
expert, I'm not sure that the culprit is indeed the JIT or the GC...
but surely someone is to be blamed).

I remember we recently had this conversation on the ML: one of Gilles
or Luc argued that for very low-level algorithms, it didn't really
matter if the parameters were passed as "very crude" objects, since it
was most likely that the user would have to write an adapter to its
own data format. So I would suggest we give up Complex[] altogether in
the interface of FFT, and replace it with double[] arrays, with the
following layout :
data[2 * i] = real part
data[2 * i + 1] = imaginary part.

What do you think?
Sébastien



Reply
Tags: implfftfeelings
Messages in this thread
Major speed improvement to 1D FFT (MATH-732)
Created] (MATH-732) Major Speed Improvement to 1D Discrete Fourier Transform (approximately 5x-9x im
January 12, 2012 12:08:04 PM
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.
Some more speed improvement for basic operations
June 7, 2010 06:01:12 PM
Hi guys, today I finished to clean the rename() operation, and I just have the three last operations remaining to be clean, ie move, moveAndRename and compare. In the meantime, I was able to avoid an Entry clone to be done, and this has a huge…
Updated: (DIRSERVER-1049) [PERF] Speed improvement in Search operation
June 16, 2010 02:28:22 AM
[ https://issues.apache.org/jira/browse/DIRSERVER-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Lecharny updated DIRSERVER-1049:
Updated: (DIRSERVER-1049) [PERF] Speed improvement in Search operation
May 26, 2010 07:27:15 AM
[ https://issues.apache.org/jira/browse/DIRSERVER-1049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Lecharny updated DIRSERVER-1049:
(math] Percentile performance improvement
October 10, 2010 10:15:24 AM
Hi all, The new implementation of Percentile improving performances has been checked in. It should solve issue <https://issues.apache.org/jira/browse/MATH-417>. As discussed here, the implementation is based on a selection algorithm instead…
Created] (MATH-597) Improvement of sampling random exponential variables
June 17, 2011 05:55:34 PM
Improvement of sampling random exponential variables
Created] (MATH-658) Dead code in FastMath.pow(double, double) and some improvement in test coverage
September 6, 2011 04:31:12 AM
Dead code in FastMath.pow(double, double) and some improvement in test coverage
Created: (MATH-530) [Math] Clirr report and 'org.apache.commons.math.stat.regression.GLSMultipleLine
February 22, 2011 11:01:04 AM
[Math] Clirr report and 'org.apache.commons.math.stat.regression.GLSMultipleLinearRegression
Created: (MATH-529) [Math] Clirr report and 'org.apache.commons.math.stat.regression.AbstractMultipl
February 22, 2011 09:39:04 AM
[Math] Clirr report and 'org.apache.commons.math.stat.regression.AbstractMultipleLinearRegress ion'
Created: (MATH-526) [Math] Clirr report and 'org.apache.commons.math.optimization.general.LevenbergM
February 22, 2011 01:38:17 AM
[Math] Clirr report and 'org.apache.commons.math.optimization.general.LevenbergMarquardtOptimi zer'
Created: (MATH-525) [Math] Clirr report and 'org.apache.commons.math.optimization.fitting.Polynomial
February 22, 2011 01:36:06 AM
[Math] Clirr report and 'org.apache.commons.math.optimization.fitting.PolynomialFitter'
Created: (MATH-531) [Math] Clirr report and 'org.apache.commons.math.stat.regression.OLSMultipleLine
February 22, 2011 11:21:03 AM
[Math] Clirr report and 'org.apache.commons.math.stat.regression.OLSMultipleLinearRegression'
Created: (MATH-532) [Math] Clirr report and 'org.apache.commons.math.util.MathUtils'
February 22, 2011 11:59:04 AM
[Math] Clirr report and 'org.apache.commons.math.util.MathUtils'
Created: (MATH-523) [Math] Clirr report and 'org.apache.commons.math.linear.OpenMapRealVector'
February 22, 2011 01:30:04 AM
[Math] Clirr report and 'org.apache.commons.math.linear.OpenMapRealVector'
Created: (MATH-533) [Math] Clirr report and 'org.apache.commons.math.util.ResizableDoubleArray'
February 22, 2011 12:09:05 PM
[Math] Clirr report and 'org.apache.commons.math.util.ResizableDoubleArray'
Created: (MATH-527) [Math] Clirr report and 'org.apache.commons.math.stat.StatUtils'
February 22, 2011 01:52:05 AM
[Math] Clirr report and 'org.apache.commons.math.stat.StatUtils'
Updated: (MATH-537) [Math] org.apache.commnons.math.linear.MatrixVisitorException constructor should
March 1, 2011 12:50:25 AM
[ https://issues.apache.org/jira/browse/MATH-537?page=com.atlassian.jira .plugin.system.issuetabpanels:all-tabpanel ] Michael Yannakopoulos updated MATH-537:
Created: (MATH-524) [Math] Clirr report and 'org.apache.commons.math.ode.AbstractIntegrator'
February 22, 2011 01:32:06 AM
[Math] Clirr report and 'org.apache.commons.math.ode.AbstractIntegrator'
Created: (MATH-537) [Math] org.apache.commnons.math.linear.MatrixVisitorException constructor should
March 1, 2011 12:50:07 AM
[Math] org.apache.commnons.math.linear.MatrixVisitorException constructor should be deprecated
Created: (MATH-538) [Math] org.apache.commons.math.ode.DerivativeException constuctor should be depr
March 1, 2011 01:03:26 AM
[Math] org.apache.commons.math.ode.DerivativeException constuctor should be deprecated
Database query speed improvement
May 14, 2011
I have the following table structure term_id int(11) concept_id int(11) idf double And I have arround 2.4 milions records. When I perform the…
SQL: Speed Improvement - Cluttered union query
February 16, 2011
SELECT * FROM ( SELECT a.user_id, a.f_name, a.l_name, b.user_id, b.f_name, b.l_name FROM current_tbl a INNER JOIN import_tbl b ON ( a.user_id =…
Php, get between function improvement - add array support
June 20, 2011
I have a function which extracts the content between 2 strings. I use it to extract specific information between html tags . However it currently…
What are the major differences between Oracle and MySQL?
January 27, 2011
What are the major differences between Oracle RDBMS and MySQL? What are typical use cases for both of them?
What is the major difference between Redis and Membase?
February 21, 2011
What are the major differences between Redis and Membase?
Major trouble matching selecting most current row
February 4, 2011
Hello, I am having major trouble selecting the most current/matching row in my database. For example: $query = "SELECT * FROM `Password_Reset`";…
Converting Django project from MySQL to Mongo, any major pitfalls?
January 17, 2011
I want to try Mongodb w/ mongoengine. I'm new to Django and databases and I'm having a fit with Foreign Keys, Joins, Circular Imports (you name it).…
Are major domainname registrars requiring glue records unnecessarily?
April 5, 2011
I have somedomain.com registered with Namecheap, and have successfully set up A records for ns1.somedomain.com and ns2.somedomain.com to be used as…
PHP array initialization speed vs memcache.get speed
March 12, 2011
I have a big array with many strings like this: $langArr = array( 'welcome' => 'Welcome!', 'hello' => 'Hello'... I wonder if it is faster if I…
Do any of the major document-oriented database systems compress keys within their JSON documents?
February 8, 2011
I would like to store a large number of JSON documents using a documented-oriented database, all with very similar schema (though not identical).…
Transaction speed vs. Query speed
May 31, 2011
Hey What is faster, one transaction with many queries or for every query a separate transaction? One transaction with many queries:…
Math in MYSQL/PHP
May 21, 2011
I'm a complete novice but I really need to get this done as soon as possible so any help would be greatly appreciated. I have a table with the…
Math with regexp in mod_rewrite
February 10, 2011
Hi. I'm trying to do the following: I have the url: http://www.example.com/9999 and I want it to seamlessly redirect to:…
Parse math operations with PHP
April 27, 2011
Hello, I am working on a project where I need to make a function that will parse the 4 default math operations (addition, subtraction,…
Math operations in regex
March 9, 2011
I need to add a number to a backreference while doing a replace operation. Eg. I am rewriting a URL www.site.com/doc.asp?doc=321&language=1 to…
Determining whether a string is a math formula?
April 26, 2011
So I'm processing math formulas from strings using the shunting-yard algorithm. I pass every string through a function which processes specific…
Breaking apart a math equation string
June 7, 2011
Pattern pattern = Pattern.compile("([^\\d.]|[\\d.]++)"); String[] equation = pattern.split("5-323"); System.out.println(equation.length); I'm trying…
How to do this simple math in a mysql query?
March 15, 2011
I have a db column called timestamp which is exactly what it holds. I want to get the sum of the timestamp and 10 days. How will that query look? In…
Rewrite formula string to replace a^b with Math.pow(a, b)
February 4, 2011
I'm at the moment trying to plot formulas on HTML5 <canvas> by letting the user put in a formula. This works great through eval() ; however,…
Mysql php date math (dateandtimeA - dateandtimeB)
May 16, 2011
I am working on a time system where I need to take the time someone punches in to when some on punches out i.e 2011-05-20 08:30:00 (punch in time) -…