Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Limit on Globals?

From: tim:johnsons-web at: 6-Nov-2001 10:11

Hi Ryan: That was a good tip: Below is session I ran (Core 2.5.0.4. on RH 6.0. 450 mhz/320 meg ram)
>> length? first system/words
== 1154
>> repeat i 40000[ctr: i set to-word to-string i i]
** Internal Error: No more global variable space ** Where: to-word ** Near: to word! :value
>> ctr
== 2939
>> length? first system/words
== 4094 hmmm! 1154 + 2939 = 4093 Do we have (kind of) the beginning of a memory managment strategy here? Can global words be "unloaded" Thanks tj On Tue, Nov 06, 2001 at 10:13:43AM -0800, Ryan Cole wrote:
> Tim Johnson wrote: > > > Hello All: > > I'm struggling with code bloat here<sigh>. > > I have a large application with a significant number of global words. > > > > 1)Does anyone have any ideas as to what would be a reasonable limit > > on the number of global words? > > 1903 by my test... > > >> repeat i 40000 [ > [ ctr: i > [ set to-word to-string i i > [ ] > ** Internal Error: No more global variable space > ** Where: to-word > ** Near: to word! :value > >> ctr > == 1903 > >> > > > > > 2)Is there an advantage to putting global words into an object? > > > > I have not been able to find any performance gain whatsoever. I would say there > is some advantage logistically, helping to avoid naming conflicts, code > portability, and just a way to devide up your source into understandable chunks. > In a large program, you may look into coding it in dialect at the higher levels. > This would take care of most naming conflicts too. Once you have gotten to > objects, dialecting is just around the bind. > > --Ryan > > -- > To unsubscribe from this list, please send an email to > [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Tim Johnson <[tim--johnsons-web--com]> http://www.johnsons-web.com