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

[REBOL] Re: Sameness - a pragmatic approach.

From: lmecir:mbox:vol:cz at: 12-Feb-2003 9:33

Hi Gabriele!
> LM> Although we have thousand identical O's, the memory > LM> consumption is bigger than for one O exactly like in the case > LM> of 1's. Interestingly enough, the memory consumed additionally > LM> is the same in both cases. > > But that is the memory consumed by the block, not the objects > themselves.
Exactly, that is why both thousand O's and thousand 1's behaved alike. My pragmatic POV is, that no confusion has been caused WRT the memory allocation. I can imagine a situation (with more complicated immutable values), when identical values can be stored at different places in the computer memory and therefore consume more memory, than one could superficially expect. OTOH, I can even imagine a situation, when a mutable value can use (temporarily) the same computer memory as another value until a mutation occurs (quite usual strategy). Summary: your model task didn't help us to find any advantages/disadvantages of any approach. Regards -L