On Jun 27, 2007, at 11:16 AM, Charles Yeomans wrote:
>
> On Jun 27, 2007, at 12:07 PM, Daniel Stenning wrote:
>
>> Say you have a method:
>>
>> Function myFunc() As Integer
>> return 1 + MYCONSTANT
>> End Function
>>
>>
>> Does anyone know if the RB compiler figures out that the return
>> expression
>> can be replaced by a numeric result calculated once at compile time ?
>>
>> ( ie performs a compile time optimisation )
>>
>
> Try it and see :)
>
How would you know, short of disassembling the code? :) Or see if
there's a preference panel for optimizations (for Constant
Folding)... :)
> Charles Yeomans
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|