Re: [Scilab-users] Large variables and execution speeds

2015-03-02 Thread Clément David
> By the way, AFAIK, graphical handles are global objects passed by > reference. Clement, aren't they? The handle's .data fields are not stored into the stack they can be used to pass by reference (and the handle act as the reference). > It is possible to hide some data in their .userdata field

Re: [Scilab-users] Large variables and execution speeds

2015-03-02 Thread Clément David
> > > .../... > > However using a tlist rhs/lhs force a copy which is not needed, using > > named arguments let the interpreter avoid some copies. > Do you mean that calls such as > > myfun(a, parname2=val2, parname1=val1) > > saves time and memory w.r.t. > > myfun(a, val1, val2) > > ? Of co

Re: [Scilab-users] Large variables and execution speeds

2015-03-01 Thread Samuel Gougeon
Tim, Using global variables as well saves time. Here attached is Clement's bench tests extended to global variables and global lists. Typical results on my PC are (in [s]) : -->exec('C:\computation.sci', -1) local LISTS:not assigned: 0.34 create recipient: 1.362 assign2 existing recipe

Re: [Scilab-users] Large variables and execution speeds

2015-03-01 Thread Samuel Gougeon
Hello Clément, Le 25/02/2015 09:16, Clément David a écrit : .../... However using a tlist rhs/lhs force a copy which is not needed, using named arguments let the interpreter avoid some copies. Do you mean that calls such as myfun(a, parname2=val2, parname1=val1) saves time and memory w.r.t.

Re: [Scilab-users] Large variables and execution speeds

2015-02-25 Thread Tim Wescott
I'm specifically hoping to avoid just exchanging pieces of the top-level object, because it's pretty abstract -- I need to count on it doing something generally similar, but possibly entirely different in the details. I realized, however, that I'm storing some pretty big arrays (several arrays of

Re: [Scilab-users] Large variables and execution speeds

2015-02-25 Thread Clément David
Hello Tim, Yes, the copies are there as Scilab does not allow to pass data by reference but only by copy. To avoid extra copy when using tlist, you have to avoid data resize which is really costly. When writing : local_tlist.some_field = stuff; There is no performance penalty if 'some_field' an

[Scilab-users] Large variables and execution speeds

2015-02-24 Thread Tim Wescott
I have an algorithm that I'm working on that involves having large data sets, which I'm currently representing as tlists. Due to the constraints of the algorithm, I'm doing many calls that are more or less of the form: my_tlist = some_function(my_tlist); The intent is to get the same effect tha