Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Possible VFP7/8 ER: Integrate Crystal Reports
Message
From
18/04/2001 01:44:56
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
To
18/04/2001 01:24:50
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00495582
Message ID:
00496555
Views:
18
>>>"Literal pool" optimization is usally found in many native compilers, but not in VFP.
>>
>>How do you come to know this? It is something SOOOOOooo basic that I would have guessed it was done everywhere (compiler-wise).
>
>I discovered it after hacking an FXP (don't recall why exactly). Check this out:
>
>
>#IF .T.        && 459 Bytes.
>   #DEFINE C_DATA "1234567890123456789012345678901234567890"
>#ELSE          && 322 Bytes.
>   C_DATA = "1234567890123456789012345678901234567890"
>#ENDIF
>
>m.a = C_DATA
>m.a = C_DATA
>m.a = C_DATA
>m.a = C_DATA
>m.a = C_DATA
>
I might add that if the constants are "short enough" (ie. a "few" bytes), then they might be more efficient than the variable case because the "literal" moves appear to be done "in-line"; it's only when the literal lengths exceeds the size of a VFP "pointer" (to the variable), that the case favors a variable.
Previous
Reply
Map
View

Click here to load this message in the networking platform