#4 smooth optimization

closed
nobody
None
5
2012-05-08
2012-04-29
Sergey A.
No

I have optimized GDL "smooth" implementation. The computation time of "foo=smooth(dist(1024),50)" have changed from 3.5 to 0.37 seconds.
I have attached the whole file because i don't know how to prepare a patch.

The point of the optimization is to use several subsequental 1d convolutions instead of 1 multidimensional convolution. This approach is mathematically correct for boxcar filter i.e. smooth.

p.s. Sorry for my english.

Discussion

  • Sergey A.
    Sergey A.
    2012-04-29

    optimized GDL smooth implimentation

     
    Attachments
  • Sergey A.
    Sergey A.
    2012-04-29

    • summary: smooth optimisation --> smooth optimization
     
  • Alain C.
    Alain C.
    2012-05-07

    thanks you !
    I made some tests and I confirm to serious improvment.
    I hope to put your change in the CVS today (I am working on few extra tests on this old but useful procedure)

    Alain

     
  • Alain C.
    Alain C.
    2012-05-08

    • status: open --> closed
     
  • Alain C.
    Alain C.
    2012-05-08

    now, your improvement is in the CVS. It is the new default. I keep the old version, it is also a simple way to test any news versions. Changes also in the test_smooth.pro. Suggestion to include clean SMOOTH test in "make test" will be welcome.

    If any problem found, please create an entry in the bug session

    Alain