× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Alan Campin wrote:
...
The other thing here that I have been reading that a CONST is better
than a VALUE but my understanding is that in many cases, VALUE's are
more efficient because the complier pushes the copy onto the stack and
can reference it directly off the stack.
A 4 byte integer on the stack is going to be a lot more efficient than a
16 byte pointer on the stack referencing to memory in another program.

Neither CONST nor VALUE is always better than the other. But if you _were_ restricted to one or the other, CONST would be a better choice.

For a few data types (pointer, float, integer), VALUE is a bit more efficient. For other data types, CONST is usually more efficient; the larger the parameter, the better CONST is. For large parameters, CONST is more efficient even if you have to copy the parameter to a temporary within the procedure to have something you can modify; this is especially true of VARYING parameters.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.