VFP optimization have concept of deterministic/ not deterministic functions.
CREATECURSOR randCursor ( F1 I DEFAULT 2015,F2 C(10) DEFAULTSYS(F1))
FOR K=1TO 100
APPENDBLANKNEXTINDEXON F2 TAG TAGSYS2
INDEXONSYS(F1) TAG TAGSYS1
CLEARSYS(3054,11)
SELECT * FROM randCursor WHERE F2=SYS(F1)