[REBOL] Re: On mutability and sameness
From: agem:crosswinds at: 7-Jun-2001 10:54
>>>>>>>>>>>>>>>>>> Ursprüngliche Nachricht <<<<<<<<<<<<<<<<<<
Am 07.06.01, 00:07:53, schrieb "Larry Palmiter" <[larry--ecotope--com]> zum
Thema [REBOL] Re: On mutability and sameness:
> Hi Joel
> > But it is equally inaccurate to assume that they are fixed-size
> > scalar values, isn't it?
> >
> > >> foo: 9.8.7.6.5.4.3.2.1.0
> > == 9.8.7.6.5.4.3.2.1.0
> > >> repeat i 10 [print foo/:i]
> >> foo: 1.2.3.4.5.6.7.8.9.10.11
> ** Syntax Error: Invalid tuple -- 1.2.3.4.5.6.7.8.9.10.11
> Not necessarily, they could be fixed size at 10 bytes (which BTW shows
that
> Volker's rule of 8 bytes does not hold). The "scalar" types could be
tagged
> pointers (references) as suggested by Volker. A few bits in the
pointer
> could designate the type and whether the value is contained within the
> pointer. As you probably know this is a common way of implementing
scalar
> types in Scheme. For tuples, there could some bits in the pointer that
say
> how long the tuple is with a max of 10.
> It is interesting to note that when an empty block is created:
> >> b: make block! 10000
> system/stats shows that 16 bytes of memory have been allocated for
each
> block element. This might indicate that REBOL "pointers" or
references
are
> 16 bytes in length. Just a speculation...
Ok, correction: max slot size 10 byte. Not much different to ~8
(around 8). ;-)
i was speculationg a usual floating point number needs 8 byte,
a pair! 2* 4-byte integer, so 8 sounded good.
Well, with 16 bytes there is space for
1 native pointer/handle(4 bytes)
+ 10 bytes data
+ 2 byte something. some kind of type-description + tuple-length?
i think this would be most simple to implement
> Regards
> -Larry
Regards
-Volker