octave-maintainers
[Top][All Lists]
Advanced

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

Re: strace of exist function for a variable


From: David Bateman
Subject: Re: strace of exist function for a variable
Date: Thu, 10 Feb 2005 11:26:02 +0100
User-agent: Mozilla Thunderbird 0.8 (X11/20040923)

David Bateman wrote:

Has any one tried to do an strace of octave while running the exist function. It appears that exist("<var>","var") will search the patch for dot-m and oct-files even though a variable was explicitly asked for. This certainly makes this significantly slower than it needs to be. Also, strace appears to show that the path is being searched twice, by exist!! It seems to me that there are some rather simple improvements in the speed of the exist function that might be made...

Regards
David

What about the following trivial fix for this problem..

2005-02-10 David Bateman <address@hidden>

* variables.cc (symbol_exist): Don't search path if explicitly asked for a variable or builtin

Regards
David

--
David Bateman                                address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary

*** src/variables.cc~   2004-12-28 02:59:05.000000000 +0100
--- src/variables.cc    2005-02-10 11:21:07.299369002 +0100
***************
*** 823,828 ****
--- 823,831 ----
        }
      }
  
+   if (type == "var" || type == "builtin")
+     retval = 0;
+ 
    if (! retval)
      {
        string_vector names (2);

reply via email to

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