On Wed, 13 Jan 2010, Szak�ts Viktor wrote: > > But if pw exists in a single instance, isn't it a waste to create a new item > > to store a string of the same lenght? > Yes, speaking about STUFF(), it is, but to avoid it, > you'd have to make several checks to verify whether > there is room to optimize it on low level, so it's > possible we wouldn't gain much at the end.
It cannot be done inside STUFF() due to strictly defined Clipper compatible syntax. To optimize code which make <cVar> := STUFF( <cVar>, <nPos>, <nDel>, <cIns> ) it's necessary to detect that result of STUFF() function is assigned to the same variable as its 1-st parameter and replace above code by new funtcion which will operate on parameter passed by reference, i.e.: __STUFF( @<cVar>, <nPos>, <nDel>, <cIns> ) So it needs new function and compile time optimization. best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
