Patrick
Patrick Mast, xHarbour. escribió:
Hi,
In the "old" Clipper days we where told to NOT overuse PUBLIC or
PRIVATE variables because they consume lots of memory and are slow.
How is this in xHarbour? Is this still true?
The PUBLIC and PRIVATE vars share space in the symbol table. The max
size in Clipper for this table is 64k, but in xHarbour the limit is 2Gb,
then we can use PUBLIC and PRIVATE vars without problem.
And, is a PUBLIC var more 'expensieve' than a PRIVATE var?
No. PRIVATE var is more "expensive" than PUBLIC, not in access but in
creation and destruction.
The PUBLIC vars are created once, but PRIVATE vars are created in each
function.
The PRIVATE vars need to be cleaned at the end of function.
Is it less 'expensive;' to have ONE public var with an array of lets
say 100 elements or 100 separate public var's?
Access to array is more "expensive" than access to PUBLIC or PRIVATE var.
Access to PUBLIC var use two PCODE.
Access to array in PUBLIC var use four PCODE.
Thanks!
Patrick
Walter Negro
No virus found in this outgoing message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.9.4/1791 - Release Date: 15/11/2008
06:57 p.m.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
xHarbour-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xharbour-developers