Page 1 of 1

Having uninitilaized Protected variables

Posted: Thu Dec 18, 2008 9:03 pm
by technicorn
Having the possiblity to have Protected variables in Procedures that are not initialized to zero,
would speed up Procedure calls a lot if you have many variables in it, that are set to other values than zero anyway.
Only exception would be strings, which pointer have to be set to zero
for the initial assignment to work.

Maybe a ProtectedUnitialized v1.l, v2.l v3.l
or
Protected v1.l = ?, v2.l = ?, v3.l = ?

Thanks
Technicorn

Posted: Fri Dec 19, 2008 12:31 am
by Trond
Actually, since the variable initialization code seems to be backpatched anyways, this should be a rather easy optimization to implement, right?

Edit: By the way, static variables can be used instead if you don't use recursion.

Posted: Fri Dec 19, 2008 6:49 am
by technicorn
Edit: By the way, static variables can be used instead if you don't use recursion.
And you don't plan on using the procedure with threads ;)