WordArray.st
changeset 736 db164846b078
parent 601 9f043e153af4
child 1177 f81425b27be5
equal deleted inserted replaced
735:6ca1d0dd6526 736:db164846b078
    37 "
    37 "
    38     WordArrays store integers in the range 0..16rFFFF.
    38     WordArrays store integers in the range 0..16rFFFF.
    39     In contrast to normal arrays (which store pointers to their elements),
    39     In contrast to normal arrays (which store pointers to their elements),
    40     wordArrays store the values in a dense & compact way. 
    40     wordArrays store the values in a dense & compact way. 
    41     Therefore, WordArrays can be used to hold bulk data in a more compact way.
    41     Therefore, WordArrays can be used to hold bulk data in a more compact way.
    42 	For example:
    42         For example:
    43 	    Array new:100000 withAll:1
    43             Array new:100000 withAll:1
    44 	requires 400k of object memory;
    44         requires 400k of object memory;
    45 
    45 
    46 	in contrast,
    46         in contrast,
    47 	    WordArray new:100000 withAll:1
    47             WordArray new:100000 withAll:1
    48 	only requires half of it.
    48         only requires half of it.
       
    49 
       
    50     [memory requirements:]
       
    51         OBJ-HEADER + (size * 2)
    49 
    52 
    50     [see also:]
    53     [see also:]
    51 	ByteArray BooleanArray FloatArray DoubleArray Array
    54         ByteArray BooleanArray FloatArray DoubleArray Array
    52 	SignedWordArray
    55         SignedWordArray
    53 
    56 
    54     [author:]
    57     [author:]
    55 	Claus Gittinger
    58         Claus Gittinger
    56 "
    59 "
    57 ! !
    60 ! !
    58 
    61 
    59 !WordArray class methodsFor:'documentation'!
    62 !WordArray class methodsFor:'documentation'!
    60 
    63 
    61 version
    64 version
    62     ^ '$Header: /cvs/stx/stx/libbasic2/WordArray.st,v 1.2 1998-01-12 13:24:29 cg Exp $'
    65     ^ '$Header: /cvs/stx/stx/libbasic2/WordArray.st,v 1.3 1999-03-19 20:42:08 cg Exp $'
    63 ! !
    66 ! !