DoubleArray.st
author claus
Mon, 04 Oct 1993 11:32:33 +0100
changeset 2 6526dde5f3ac
parent 1 a27a279701f8
child 3 24d81bf47225
permissions -rw-r--r--
2.7.2

"
 COPYRIGHT (c) 1993 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

ArrayedCollection variableDoubleSubclass:#DoubleArray
       instanceVariableNames:''
       classVariableNames:''
       poolDictionaries:''
       category:'Collections-Indexed'
!

DoubleArray comment:'

COPYRIGHT (c) 1993 by Claus Gittinger
	      All Rights Reserved

DoubleArrays store double floats (and nothing else).
They have been added to support heavy duty number crunching somewhat
more than other smalltalks do. Storing Floats & Doubles in these
objects many benefits:

1) since the values are stored directly (instead of pointers to them)
   both access overhead and garbage collect overhead is minimized.

2) they can be much faster passed to c functions (such as graphics 
libraries or heavy duty math packages)

3) they could (in theory) be much more easily be processed by things like
vector and array processors

Be aware however, that Float- and DoubleArrays are not supported in other
smalltalks - your program will thus become somewhat less portable.
(since their protocol is the same as normal arrays filled with floats,
 they can of course be easily simulated - a bit slower)

See an example use in the GLX interface.

%W% %E%

written june 93 by claus
'!