×
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.
Brad Stone wrote:
Ya, I've heard about this as well. Is the suggestion then
to return pointers? Does this also apply to passing
parameters that are large values, or just returning large
values?
Brad: The recommendation is that if you're concerned about performance,
it's best to avoid returning large declared values. For example, if the
return value of a procedure were declared as 20000A VARYING, you might
expect that returning a 2 character long string would be faster than
returning a 20,000 character long string. But since W-Code doesn't know
that an aggregate contains a varying length string, it will copy all
20,002 bytes of the varying value, making both equally slow.
So you have to make a choice. (So what else is new?) If you want a
flexible and easy to use string procedure, define it as returning a
VARYING length string. If you want a *fast* string procedure, then
return the result string in a reference parameter.
(BTW, improving the performance of large aggregate return values is a
future objective.)
Cheers! Hans
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.