From: stt@henning.camb.inmet.com (Tucker Taft)
Subject: Re: Q: unboxed values and polymorphism
Date: 1996/06/17
Date: 1996-06-17T00:00:00+00:00 [thread overview]
Message-ID: <Dt4FCx.29H.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: uvv7mt7ubgd.fsf@chaq.informatik.uni-tuebingen.de
Hannes Haug (Hannes.Haug@Student.Uni-Tuebingen.de) wrote:
: ...
: Sort of. Fixnums are integers in the range -2^30 ... 2^30-1. Other
: integers are interpreted as pointers to (or indices in arrays of)
: bignums or list cells. And it is not a bad idea.
: Jon> I'm not sure what it is you are trying to do. Make a list?
: Jon> Make a generic list? Make a typed polymorphic list? Make an
: Jon> untyped uncheckd programmer beware list? What?
: I need it for my computer algebra nucleus. I need lisp-like dynamic
: typing. I cannot use tagged records. This would make a list cell 50%
: bigger. This would mean 33% less list cells. And this would mean 50%
: more garbage collections. I also need the type information on the stack
: for my garbage collector. I cannot use records for fixnums either. This
: would mean a "new" for every operation. My nagation takes ca. 20 nsec
: for fixnums on a 90MHz hyperSPARC. With a "new" this would be a not so
: little bit slower. Perhaps the usage of records for fixnums would even
: make some functions too big for inlining.
Rather than tagged records, which allow for "unbounded" polymorphism,
you might want to simply use a variant record. By using an appropriate
record representation clause, you should be able to keep your list
cells down to 2 words. You might still find a use for unbounded
polymorphism (i.e. tagged records), when you point to larger objects
which are not simply composted of list cells. However, if you
are essentially implementing a variant of Lisp, then I doubt if
tagged records will do much for you. Tightly encoded variant records
seem more likely to be the answer.
: - hannes
-Tucker Taft stt@inmet.com http://www.inmet.com/~stt/
Intermetrics, Inc. Cambridge, MA USA
next prev parent reply other threads:[~1996-06-17 0:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-06-15 0:00 Q: unboxed values and polymorphism Hannes Haug
1996-06-15 0:00 ` Robert Dewar
1996-06-15 0:00 ` Jon S Anthony
1996-06-16 0:00 ` Hannes Haug
1996-06-17 0:00 ` Tucker Taft
1996-06-17 0:00 ` Hannes Haug
1996-06-18 0:00 ` Robert Dewar
1996-06-22 0:00 ` Robert A Duff
1996-06-22 0:00 ` Robert Dewar
1996-06-18 0:00 ` Fergus Henderson
1996-06-17 0:00 ` Tucker Taft [this message]
1996-06-17 0:00 ` Tucker Taft
1996-06-22 0:00 ` Hannes Haug
1996-06-22 0:00 ` Robert Dewar
[not found] ` <uvvhgryr22d.fsf@chaq.informatik.uni-tuebingen.de>
1996-06-28 0:00 ` Robert Dewar
1996-07-02 0:00 ` Fergus Henderson
1996-06-18 0:00 ` Jon S Anthony
1996-06-19 0:00 ` Hannes Haug
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox