octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #61674] deconv much slower than conv


From: Arun Giridhar
Subject: [Octave-bug-tracker] [bug #61674] deconv much slower than conv
Date: Wed, 15 Dec 2021 17:36:58 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0

Follow-up Comment #3, bug #61674 (project octave):

Though I said in comment #2 that filter.cc could not be sped up, I had second
thoughts and examined various sections of the filter function with
std::chrono::high_resolution_clock. Ultimately it looks like the bulk of the
execution time was taken by the several calls to octave_quit() inside the
innermost for-loops. I removed them and the speed of filter and deconv both
increased by 6 times! Passes BISTs and did not affect Ctrl-C operation. I
suspect the calls to octave_quit() were added when computer speeds were such
that frequent checking for interrupts made sense. but now it only seems to
slow down execution without added benefit.

New benchmark data from the code in comment #2. It now takes only 6.1 seconds
instead of 35 seconds. This is still slower than conv2 but not 10x slower,
only some 1.8x slower. Some progress anyway.

octave:1> N = 40320; profile clear; tic; profile on; Q =
cyclotomicpolynomial_deconv (N); profile off; toc, T = profile("info");
profshow (T)
Elapsed time is 6.10674 seconds.
   #                    Function Attr     Time (s)   Time (%)        Calls
--------------------------------------------------------------------------
  59                      filter             5.870      96.31         1844
   1 cyclotomicpolynomial_deconv    R        0.116       1.91           96
  55                      deconv             0.069       1.13         1844


(Other function calls are the same.)

Hg diff attached for filter.cc to get this 6x speedup. Please test and see if
all is good. If it is, I'll upload a patch with a commit message.

(file #52510)
    _______________________________________________________

Additional Item Attachment:

File name: filter.patch                   Size:1 KB
    <https://file.savannah.gnu.org/file/filter.patch?file_id=52510>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61674>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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