User:SignpostMarv Martin/LSL Memory

From Second Life Wiki
Jump to navigation Jump to search

<lsl>string vector2string(vector foo) {

   return (string)foo;

} list vector2strided(vector foo) {

   return [foo.x,foo.y,foo.z];

} vector rand() {

   return <llFrand(3.402823466E+38),llFrand(3.402823466E+38),llFrand(3.402823466E+38)>;

} list store; integer x; default {

   state_entry()
   {
       for(x=0;x>-1;++x)
       {
           llOwnerSay((string)x);
           store += [rand()];
       }
   }

}</lsl>

MethodStored (mono)Stored (LSL)
+= [rand()]2164342
+= [vector2string(rand())]20046
+= vector2strided(rand())1010161
ZERO_VECTOR
+= [ZERO_VECTOR]2183343
+= [<.0,.0,.0>]2183343
+= ["<.0,.0,.0>"]7636336
+= ["<0,0,0>"]7637388
+= [vector2string(ZERO_VECTOR)]797202
+= [vector2string(<.0,.0,.0>)]797202
+= vector2strided(ZERO_VECTOR)1010161
+= vector2strided(<.0,.0,.0>)1010161
+= [.0,.0,.0]1019161
+= [0,0,0]1019161