o = Createobject('myTest') m.o.doit() Define Class myTest As Line myProperty = 5 Procedure doit Create Cursor This (myProperty i) Insert Into This Values (1) Select 0 ? This.myProperty ? m.this.myProperty Endproc EnddefinePS: Using keywords as cursor/aliasnames is another story but say I already utilize 'update' command not making a difference between and alias and an objectname :)
CREATE TABLE Mdot (emptyloop N(9, 6), withmdot N(9, 6),; > withoutm N(9, 6), withfaster L, netdiff N(9, 6)) > >DEFINE CLASS MTest AS Custom > > PROCEDURE TestMDot(tiouter AS Integer, tiinner AS Integer) > > LOCAL linner, liouter, ox, emptyloop, withmdot,; > withoutm, withfaster, netdiff, lii, lij, lnstart,; > lnstop > _SCREEN.Visible = .F. > liouter = tiouter > linner = tiinner > FOR lii = 1 TO liouter > lnstart = SECONDS() > FOR lij = 1 TO linner > NEXT > lnstop = SECONDS() > emptyloop = lnstop - lnstart > ox = NULL > lnstart = SECONDS() > FOR lij = 1 TO linner > ox = m.This > NEXT > lnstop = SECONDS() > withmdot = lnstop - lnstart > ox = NULL > lnstart = SECONDS() > FOR lij = 1 TO linner > ox = This > NEXT > lnstop = SECONDS() > withoutm = lnstop - lnstart > withfaster = (withmdot < withoutm) > netdiff = withmdot - withoutm > IF liouter > 1 THEN > APPEND BLANK > GATHER MEMVAR > ENDIF > NEXT > _SCREEN.Visible = .T. > ENDPROC >ENDDEFINE > >* This starts the tests >SET PROCEDURE TO MTest >oTest = CREATEOBJECT('MTest') >* Make sure that the code is in memory >oTest.TestMDot(1, 1) >* Run the test 10 times with a million iterations >oTest.TestMDot(10, 1000000)The results were that, on average using "mdot" when referencing an existing obect was over 20% (20.7764%) slower.