From maintainers-request at octave dot org Sun Jan 30 01:19:07 2005 Subject: Re: min function very slow? From: Daniel J Sebald To: maintainers at octave dot org Cc: maintainers at octave dot org Date: Sun, 30 Jan 2005 01:24:35 -0600 John W. Eaton wrote: >If you have min and max in .oct files, then they are really defined in >the same file (minmax.oct) and the min.oct and max.oct files are just >additional links in the filesystem. It seems that the second one >loaded is much slower. I think this must be some accidental overhead >in checking whether the symbol needs to be reloaded. > But how would this account for Dmitri's example in a script file where upon first run it's fine and thereafter is slow? > The problem goes >away for me if I define min and max in separate files (i.e., create >min.cc and max.cc, each with only one DEFUN_DLD macro) or if I set >ignore_function_time_stamp = "all" (I'm not sure why setting it to >"system" fails, even when the min/max functions are installed in a >"system" directory). > > But breaking it into separate files could simply be shuffling around code as well. I.e., the problem moves somewhere else. At least what you've found sort of rules out the code in dNDArray.cc, which is no surprise. Dan