[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Update to Discrete Hankel Transform

From: Felipe Attanasio
Subject: Update to Discrete Hankel Transform
Date: Sun, 17 Oct 2021 11:58:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0


After noticing the "FIXME" in line 205 of dht/dht.c, suggesting a potential optimisation, I looked further into it. I have changed the size of the array Jjj (to size^2, instead of size*(size+1)/2 and re-arranged its entries, such that it can be read sequentially when 'gsl_dht_apply' is called. This has the effect of reducing the number of memory reads and thus makes 'gsl_dht_apply' run more efficiently. I've ran some tests with 'size = 4000' and 5000 and have seen a speed-up of 2-3 times compared to the original GSL implementation.
I've also ran 'make check' and no errors have been reported.

In order to perform the aforementioned re-arrangement, when 'gsl_dht_init' is called a temporary array is allocated and populated with the elements that would originally be in Jjj, then the code loops over the
temporary array and populates Jjj.

I am attaching to this email the patch containing the differences. Feel free to reach out to me if there are any


Felipe Attanasio

Attachment: dht.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]