| | 1 | Here are some convolution benchmarks using direct (<code>psImageConvolveDirect</code>) and FFT convolution (<code>psImageConvolveFFT</code>). The source is in <code>psLib/test/convolveBench.c</code>. Times are in seconds per convolution. The kernel sizes are the full sizes, distributed evenly about 0. |
| | 2 | |
| | 3 | No multithreading, or any other tricks, were used, except that psLib was compiled with <code>--enable-optimize</code>. |
| | 4 | |
| | 5 | The bottom line is that unless the kernel is really large (more than around 10 pix, corresponding to about 2.5 arcsec for PS1), direct convolution is the way to go. |
| | 6 | |
| | 7 | * On <code>alala</code>: |
| | 8 | <pre> |
| | 9 | # Image Kernel Direct FFT |
| | 10 | 100x100 7x7 0.014120 0.023974 |
| | 11 | 200x200 7x7 0.004930 0.025839 |
| | 12 | 400x400 7x7 0.019928 0.143949 |
| | 13 | 600x600 7x7 0.045172 0.240070 |
| | 14 | 800x800 7x7 0.080492 0.581588 |
| | 15 | 1000x1000 7x7 0.125420 1.776494 |
| | 16 | 2000x2000 7x7 0.504519 5.551337 |
| | 17 | 4000x4000 7x7 2.009139 38.239530 |
| | 18 | 600x600 3x3 0.016893 0.245433 |
| | 19 | 600x600 5x5 0.028220 0.206202 |
| | 20 | 600x600 7x7 0.045632 0.238620 |
| | 21 | 600x600 9x9 0.095164 0.204965 |
| | 22 | 600x600 13x13 0.176188 0.239563 |
| | 23 | 600x600 17x17 0.271444 0.263421 |
| | 24 | 600x600 21x21 0.394447 0.267914 |
| | 25 | 600x600 31x31 0.786528 0.266132 |
| | 26 | </pre> |
| | 27 | |
| | 28 | * on <code>mithrandir</code>: |
| | 29 | <pre> |
| | 30 | # Image Kernel Direct FFT |
| | 31 | 100x100 7x7 0.029464 0.007483 |
| | 32 | 200x200 7x7 0.013420 0.016342 |
| | 33 | 400x400 7x7 0.053638 0.101447 |
| | 34 | 600x600 7x7 0.123597 0.304330 |
| | 35 | 800x800 7x7 0.223795 0.557118 |
| | 36 | 1000x1000 7x7 0.346237 0.669387 |
| | 37 | 2000x2000 7x7 1.338501 5.108009 |
| | 38 | 4000x4000 7x7 5.397184 25.005011 |
| | 39 | 600x600 3x3 0.036354 0.300892 |
| | 40 | 600x600 5x5 0.071562 0.250613 |
| | 41 | 600x600 7x7 0.122224 0.302385 |
| | 42 | 600x600 9x9 0.218580 0.276135 |
| | 43 | 600x600 13x13 0.412700 0.262436 |
| | 44 | 600x600 17x17 0.662877 0.163675 |
| | 45 | 600x600 21x21 0.969317 0.271112 |
| | 46 | 600x600 31x31 2.036099 0.329363 |
| | 47 | </pre> |