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

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

[Octave-bug-tracker] [bug #60860] Implementation of memoize


From: Kai Torben Ohlhus
Subject: [Octave-bug-tracker] [bug #60860] Implementation of memoize
Date: Thu, 25 Nov 2021 02:02:35 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36

Update of bug #60860 (project octave):

                  Status:         Patch Submitted => Need Info              

    _______________________________________________________

Follow-up Comment #5:

Thanks for you contribution @gyom.  I created a proper patch from the zip
archive (file #52341).

The function looks great, only m-code, thus not much danger for Octave 7 to be
added. 👍

I would love push the patch, if more documentation is added to the main
function "memoize" and maybe a small documentation section in the manual

https://octave.org/doc/v6.4.0/Vectorization-and-Faster-Code-Execution.html

could be added.  If you think you cannot make it before the Octave 7 release
(beginning of 2022) we should remove the release tag and take more time to
document it.

Please also add a good example showing where this function helps speeding up
and where most likely not, see my critics below. 😇

Crititcs to the Matlab inventors: After looking at this function, I feel much
less excited about it.  The technique seems very dull and maybe useful for
Octave/Matlab beginners, lazy programmers, or benchmark forgeries.  In my
humble opinion this function supports bad programming practice, e.g. code
repetition (plain copy&paste).

Saving an expensively computed output for later usage manually inside a script
or function seems to me much faster than saving and compairing input-output
pairs for a function in an wrapper object for later replay 😓  This can only
be beneficial if input and output are mostly scalars and the function is
really often called during a single Octave session...


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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