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

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

[Octave-bug-tracker] [bug #59840] repmat and repelem slower than needed,


From: Rik
Subject: [Octave-bug-tracker] [bug #59840] repmat and repelem slower than needed, faster implimentation suggested
Date: Tue, 19 Jan 2021 12:13:54 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36

Follow-up Comment #9, bug #59840 (project octave):

Given that kron requires the multiplication of each A(i,j) by the matrix B it
had been my thought that the product of dimensions would be the right
criteria.  That's why I was surprised to find there was a dependence on the
actual values of m, n, p, q rather than just their product.  I will review
your results on my computer when I have the chance.

One thing to note is that there may be much more variability in the kron-based
approach compared to the indexing approach.  The indexing approach relies
solely on creating large contiguous blocks of memory (essentially malloc())
and then copying data (essentially memcpy).  There will be a dependence on
processor bus speeds and the speed of attached memory, but that's about it.

The kron-based approach uses multiplication which, for starters, may be
software-emulated on very simple processors versus having a dedicated hardware
multiplier.  Even when a HW multiplier is present, there may be varying number
per processor.  This may mean it is too difficult to find a cut-off that works
well for a range of machines.  But, I will take a look.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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